4

I have an OpenL2TP VPN instance running to a company providing me with connections to cellphone modems in the 10.4.2.0/24 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 10.4.2.0 netmask 255.255.255.0 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?

Thanks

2 Answers2

2

The devices on the 10.4.2.0/24 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 10.4.2.0/24 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.

topdog
  • 3,520
  • 17
  • 13
0

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.

gravyface
  • 13,957
  • 19
  • 68
  • 100