-   Linux - Software (
-   -   routing / vpn issue (

Rickead2000 01-24-2010 05:28 PM

routing / vpn issue

I have set up a VPN using openvpn and am having a few issues getting the hosts on LAN A to talk to hosts on LAN B and vice versa.

I have got the VPN connected and the VPN client machine can ping and talk to the VPN server. However, hosts on the VPN client network cannot talk to the VPN server or hosts on the VPN server's LAN.

I think this is just a simple routing problem, but I would appreciate if someone can clarify. It's very important that no NAT occurs between hosts on LAN A (client LAN) and hosts on LAN B (server LAN).

Here's my network....

openvpn is installed on a router (running dd-wrt) that connects LAN A to the internet.

Client LAN network: /
Client LAN gateway & vpn router IP:

Server LAN network: /
Server LAN IP:

VPN Network: /
VPN Server IP:
VPN Client IP:

Here's what happens why I try to ping:-

(ping from vpn client)# ping
64 bytes from seq=0 ttl=64 time=3.652 ms

(ping from vpn server)# ping
No response

(ping from a machine on client LAN)# ping
No response

(ping from a machine on client LAN)# ping
No response

(ping from vpn server)# ping
No response

Someone said I need to set up static routes - can anybody explain exactly what I need to do?

Here's the route command run from the client vpn

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * UH 0 0 0 tun0 UGH 0 0 0 tun0 UG 0 0 0 tun0 * U 0 0 0 br0 * U 0 0 0 vlan1 * U 0 0 0 br0 * U 0 0 0 lo
default 12-121-80-1.zon UG 0 0 0 vlan1

Rickead2000 01-24-2010 05:34 PM

Incidentally, if I run

iptables -A POSTROUTING -t nat -o tun0 -j MASQUERADE

on the VPN client, machines on the client LAN can now ping and access machines on the Server LAN.

Although this now seems to be doing nat because connections from hosts on the client LAN to hosts on the server LAN now all show as coming from (the client VPN ip) and not the address

All times are GMT -5. The time now is 06:22 AM.