I have an OpenL2TP VPN instance running to a company providing me with connections to cellphone modems in the private IP range. This server is on the same private network as three other web servers that need to be able to send traffic to the same range via the VPN connection on this one machine.

I created the route:

sudo route add -net netmask gw [private vpn server local address] dev eth0

But that doesn't route the traffic once it gets to the vpn server, or at least it doesn't route it back.

How do I route this traffic two-way from the three servers to the VPN server?



The devices on the network may only know how to return traffic to the host with the VPN address, you need to NAT traffic from the web servers to the VPN interface address such that the devices return the traffic to the VPN end point which will then send it to your web servers.

With the present setup the devices could be responding to the traffic via their default gateways which then gets dropped.


A bit fuzzy on the network layout (need another coffee), but you likely need to add a static route in the Web server's default gateway to route traffic to your VPN gateway, or add static routes to each Web server to accomplish the same thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.