help with openvpn

Luca Ferrari fluca1978 at infinito.it
Tue Mar 9 11:00:22 UTC 2010


Hi all,
I'm running Ubuntu 9.1 as a router/gateway/firewall and I've installed OpenVPN 
on such machine in order to make a VPN to the lan the gateway is maquerading.
The situation is the following:
1) the machine as an internal ip address of 192.168.1.7, and it covers the lan 
192.168.1.0/24
2) the machine can route traffic from the lan 192.168.1.0/24 to the lan 
192.168.4.0/24

I've configured openvpn and I can succesfully connect to the gateway and see 
the lan 192.168.1.0/24, but I cannot route in any way to the 192.168.4.0/24 
network. I've tried to push the route from the openvpn server to the client, 
so in my server configuration file I've got:

push "route 192.168.4.0 255.255.255.0"

When the client connects I can see the routing table with an entry for the net 
192.168.4.0/24, thru the gateway 192.168.3.6 (192.168.3.0/24 is my vpn 
network). However the traffic is not redirected. The routing table of the 
gateway machine is the following:

192.168.4.0     192.168.1.245   255.255.255.0   UG    0      0        0 eth0
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 tap0

I've already enabled the tap and tun interface forwarding, but I cannot 
understand what (and how) to add a rule to route the vpn client traffic to the 
other network.

Anybody has a clue?

Thanks,
Luca




More information about the ubuntu-users mailing list