weird routing problem
Posted: Wed Jun 19, 2013 1:37 pm
Hi,
I need an explanation as to why this is happening because I do not understand. I've been running openvpn for a number of years now and have 8 sites running site-to-site openvpn tunnels w/o issue.
I've recently stood up a new openvpn server (Ubuntu 12.04 LTS, openvpn 2.2.1) and configured it in a manner similar to another, older system (Ubuntu 10.10, openvpn 2.1.0). In my config, I have a ccd directory with a file for the client supported by this server. The file has an iroute directive for the LAN behind the client's router (also Ubuntu 12.04 LTS). Within the .conf file, I have routes for the client's subnet and am doing "push route xx.xxx.xx..." for those subnets - here's an excerpt:
port 1194
proto udp
dev tun0
... cert, dh info ...
server 10.56.0.0 255.255.255.0
client-config-dir /etc/openvpn/ccd
client-to-client
route 192.168.200.0 255.255.255.0
push "route 192.168.200.0 255.255.255.0"
push "redirect-gateway def1"
...
This config works w/o issue on the older systems. However, on the clients connecting to the 12.04/2.2.1 server, I'm seeing something really bizarre: if the vpn tunnel is up, laptops behind the client router cannot access resources from the client router forward; they cannot ping the router (it's also the LAN default gateway) and cannot access the Internet. They still can acquire an IP address from the client router (it has DHCP running on it) but that's about it.
When I stop the tunnel, laptops behind the client router can ping the router again though they cannot access the Internet (redirect-gateway in place and iptables forces all traffic the the tun adapter based on the postrouting rules that are set). During my investigation of this issue, I found a "weird" entry in the client router's route table:
...
192.168.200.0 255.255.255.0 10.56.0.5 tun0
192.168.200.0 255.255.255.0 0.0.0.0 eth1
On a hunch that this was a problem, I manually deleted the first one and within a couple of seconds everything worked - laptops behind the client router could ping the router and access the Internet. The problem re-asserted itself after a restart of the vpn process and was again resolved by manually deleting the route.
After a little trial-and-error, i found that if I removed the push "route 192.168.200.0 255.255.255.0" from the server conf. file and recycled the vpn process on the server that the problem went away. I have not been able to check (as of yet) to see if LAN resources behind the client router are available from the server side; hope to do that tonight.
This routing association does not show up in any other system that I currently manage, even though the conf. files for the older systems are set up like the excerpt shown above (iroute in ccd/file, route, push "route xxx") so I am wondering why this setup is different than the older ones - can anyone explain it to me?
Thanks...
I need an explanation as to why this is happening because I do not understand. I've been running openvpn for a number of years now and have 8 sites running site-to-site openvpn tunnels w/o issue.
I've recently stood up a new openvpn server (Ubuntu 12.04 LTS, openvpn 2.2.1) and configured it in a manner similar to another, older system (Ubuntu 10.10, openvpn 2.1.0). In my config, I have a ccd directory with a file for the client supported by this server. The file has an iroute directive for the LAN behind the client's router (also Ubuntu 12.04 LTS). Within the .conf file, I have routes for the client's subnet and am doing "push route xx.xxx.xx..." for those subnets - here's an excerpt:
port 1194
proto udp
dev tun0
... cert, dh info ...
server 10.56.0.0 255.255.255.0
client-config-dir /etc/openvpn/ccd
client-to-client
route 192.168.200.0 255.255.255.0
push "route 192.168.200.0 255.255.255.0"
push "redirect-gateway def1"
...
This config works w/o issue on the older systems. However, on the clients connecting to the 12.04/2.2.1 server, I'm seeing something really bizarre: if the vpn tunnel is up, laptops behind the client router cannot access resources from the client router forward; they cannot ping the router (it's also the LAN default gateway) and cannot access the Internet. They still can acquire an IP address from the client router (it has DHCP running on it) but that's about it.
When I stop the tunnel, laptops behind the client router can ping the router again though they cannot access the Internet (redirect-gateway in place and iptables forces all traffic the the tun adapter based on the postrouting rules that are set). During my investigation of this issue, I found a "weird" entry in the client router's route table:
...
192.168.200.0 255.255.255.0 10.56.0.5 tun0
192.168.200.0 255.255.255.0 0.0.0.0 eth1
On a hunch that this was a problem, I manually deleted the first one and within a couple of seconds everything worked - laptops behind the client router could ping the router and access the Internet. The problem re-asserted itself after a restart of the vpn process and was again resolved by manually deleting the route.
After a little trial-and-error, i found that if I removed the push "route 192.168.200.0 255.255.255.0" from the server conf. file and recycled the vpn process on the server that the problem went away. I have not been able to check (as of yet) to see if LAN resources behind the client router are available from the server side; hope to do that tonight.
This routing association does not show up in any other system that I currently manage, even though the conf. files for the older systems are set up like the excerpt shown above (iroute in ccd/file, route, push "route xxx") so I am wondering why this setup is different than the older ones - can anyone explain it to me?
Thanks...