Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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