Connecting Tech Pros Worldwide Help | Site Map

OpenVpn routing issue

Newbie
 
Join Date: Aug 2008
Posts: 13
#1: Nov 3 '08
Hi everyone,

I'm somewhat new to Linux, and completely new to OpenVPN. But here is my situation, I have OpenVPN Installed on my server runing Ubuntu 7.10. I also have wandered through tutorials and have it runing to the point where I can connect to it.

server.conf
Expand|Select|Wrap|Line Numbers
  1. local 10.0.0.242
  2. port 1194
  3. ;proto tcp
  4. proto udp
  5. ;dev tap
  6. dev tun0
  7. ;dev-node MyTap
  8. ca ca.crt
  9. cert server.crt
  10. key server.key  # This file should be kept secret
  11. dh dh1024.pem
  12. server 10.10.10.0 255.255.255.0
  13. ;ifconfig-pool 10.10.10.10 10.10.10.30
  14. ifconfig-pool-persist ipp.txt 0
  15. ;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
  16. push "route 10.0.0.0 255.255.255.0"
  17. ;push "route 10.10.10.0 255.255.255.0"
  18. ;client-config-dir ccd
  19. ;route 192.168.40.128 255.255.255.248
  20. ;client-config-dir ccd
  21. ;route 10.9.0.0 255.255.255.252
  22. ;learn-address ./script
  23. ;push "redirect-gateway"
  24. ;push "dhcp-option DNS 10.10.10.1"
  25. ;push "dhcp-option WINS 10.8.0.1"
  26. client-to-client
  27. duplicate-cn
  28. keepalive 10 120
  29. ;tls-auth ta.key 0 # This file is secret
  30. ;cipher BF-CBC        # Blowfish (default)
  31. ;cipher AES-128-CBC   # AES
  32. ;cipher DES-EDE3-CBC  # Triple-DES
  33. comp-lzo
  34. ;max-clients 100
  35. ;user nobody
  36. ;group nobody
  37. persist-key
  38. persist-tun
  39. status openvpn-status.log
  40. ;log         openvpn.log
  41. ;log-append  openvpn.log
  42. verb 3
  43. ;mute 20
  44.  
And like I said, this is working to the point where I can connect, get and IP, and ping 10.10.10.1 (as I understand thats the gateway). Here is route -n on the server.

Expand|Select|Wrap|Line Numbers
  1. root@administrator-desktop:/etc/openvpn# route -n
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. 10.10.10.2      0.0.0.0         255.255.255.255 UH    0      0        0 tun0
  5. 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
  6. 10.10.10.0      10.10.10.2      255.255.255.0   UG    0      0        0 tun0
  7. 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
  8. 0.0.0.0         10.0.0.250      0.0.0.0         UG    100    0        0 eth0
  9.  
Here is a rough drawing of my topology,
Expand|Select|Wrap|Line Numbers
  1. |   10.0.0.250/24   |  ------  Server 2000
  2.           |
  3.           |
  4.           |
  5. |   10.0.0.242/24   |  ------   Ubuntu 7.10
  6.             \
  7.               \______10.10.10.x\24
  8.                           (vpn dhcp pool)
  9.  
Here is my client.ovpn, my client is Windows XP.
Expand|Select|Wrap|Line Numbers
  1. client
  2. ;dev tap
  3. dev tun
  4. ;dev-node MyTap
  5. ;proto tcp
  6. proto udp
  7. remote 10.0.0.242
  8. ;remote my-server-2 1194
  9. ;remote-random
  10. resolv-retry infinite
  11. nobind
  12. ;user nobody
  13. ;group nobody
  14. persist-key
  15. persist-tun
  16. ;http-proxy-retry # retry on connection failures
  17. ;http-proxy [proxy server] [proxy port #]
  18. ;mute-replay-warnings
  19. ca ca.crt
  20. cert client1.crt
  21. key client1.key
  22. ;ns-cert-type server
  23. ;tls-auth ta.key 1
  24. ;cipher x
  25. comp-lzo
  26. verb 3
  27. ;mute 20
  28.  
Now, when I connect I get an address of 10.10.10.6\30. I'm not 100% sure why its giving me a subnet of 255.255.255.252 instead of 255.255.255.0 when I specifically have "10.10.10.0 255.255.255.0" in the server.conf, and I almost want to think that's where I'm getting problems. The 10.0.0.250 is one of our servers thats NATing our internal network of 10.0.0.x. I have the ports forwarded so there is connectivity from outside our network. The Ubuntu server is inside at 10.0.0.242. When I connect, I can ping 10.10.10.1, and 10.0.0.242(LAN address of the ubuntu server), but that's all I can get a reply from. From inside the LAN, I can also ping 10.10.10.1, but can't get to any of the remote computers. Am I just missing a route or something?

Thanks for any help,

Scotter
Reply