I have setup 2 x Debian boxes to run my VPN.
My goal is to link 2 LANs together with a openvpn tunnel, primarily for IP phones.
Here is my Config files from Server (LAN1) and Client (LAN2)
Server
Code: Select all
server 10.8.0.0 255.255.255.0
proto udp
port 1194
dev tun
keepalive 10 120
daemon
writepid /var/run/openvpn.pid
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
verb 3
mute 20
client-to-client
cd /etc/openvpn
tls-server
tls-auth keys/ta.key 0
cipher BF-CBC
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem
client-config-dir ccd
route 192.168.2.0 255.255.255.0
log openvpn.log
ifconfig-pool-persist ipp.txt
push "route 192.168.1.0 255.255.255.0"
Code: Select all
client
proto udp
dev tun
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
comp-lzo
daemon
writepid /var/run/openvpn.pid
verb 3
mute 20
user nobody
group nogroup
cd /etc/openvpn
ca keys/ca.crt
cert keys/client1.crt
key keys/client1.key
tls-auth keys/ta.key 1
log openvpn.log
I can ping each of the vpn boxes from each other and i can ping their respective LAN IPs but i cant ping anything behind it from either box.
I have setup on the Routers (ADSL Modems) a static route
LAN1: 192.168.2.0 255.255.255.0 > 192.168.1.220 (LAN2 subnet and server local IP on LAN1)
LAN2: 192.168.1.0 255.255.255.0 > 192.168.2.220 (LAN1 subnet and client local IP on LAN2)
and here is the results of route tables on the Debian boxes
Server
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.2.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.3 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.8.0.0 10.8.0.3 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
0.0.0.0 192.168.2.254 0.0.0.0 UG 0 0 0 eth0
Thanks for your help
