Trying to route traffic through a tunnel server error: "Nexthop has invalid gateway"
Matthew Harrington
Short version: we have servers in another data center and we have an openvpn tunnel between them.
For the first time, I need to hang server on a different subnet from the tunnel server and I'm getting killed trying to add a route.
Box A: 10.129.78.101 Box B: 10.129.68.80 (This is the tunnel server)
For all other 10.129.68.X boxes, adding a route through 10.129.68.80 was easy peasy. Here I'm having a problem. I've added a route to 10.129.68.80 and I can hit it no problem. When I try to use it as a gateway for another route it's puking:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.129.78.1 0.0.0.0 UG 0 0 0 ens32
10.129.68.80 10.129.78.1 255.255.255.255 UGH 0 0 0 ens32
10.129.78.0 0.0.0.0 255.255.254.0 U 0 0 0 ens32Try to add a route and puke city:
ip route add 10.0.8.0/22 via 10.129.68.80 dev ens32
Error: Nexthop has invalid gateway.Any ideas?
1 Reset to default