I have an openvpn tunnel setup between two networks. The setup is working to a point here is what's happening:
1) I cannot ping anything on the server lan (192.168.1.0) from the client's lan (192.168.3.0)
2) I can ping anything on the server lan (192.168.1.0) from the client itself (eth0 - 192.168.3.254, tun0 - 10.8.0.10)
3) I cannot ping anything on the client lan (192.168.3.0) from the server itself (eth0 - 192.168.1.1, tun0 - 10.8.0.1)
4) I cannot ping anything on the client lan (192.168.3.0) from the server lan (192.168.1.0)
The openvpn server is not the default host on it's lan but the router (192.168.1.254) forwards the following to it (10.8.0.0, 192.168.3.0) hence the server lan replies to ping's from the client.
Here is my server routing table:
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.3.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.64.64.64 0.0.0.0 UG 0 0 0 3g-wan
10.8.0.1 10.8.0.9 255.255.255.255 UGH 0 0 0 tun0
10.8.0.9 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 3g-wan
192.168.1.0 10.8.0.9 255.255.255.0 UG 0 0 0 tun0
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Select all
$ping 192.168.3.234
...
12:29:13.431174 IP 10.8.0.1 > 192.168.3.234: ICMP echo request, id 3097, seq 1, length 64
12:29:14.430747 IP 10.8.0.1 > 192.168.3.234: ICMP echo request, id 3097, seq 2, length 64
12:29:15.430736 IP 10.8.0.1 > 192.168.3.234: ICMP echo request, id 3097, seq 3, length 64
12:29:16.430739 IP 10.8.0.1 > 192.168.3.234: ICMP echo request, id 3097, seq 4, length 64
Code: Select all
$ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56 bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=545.421 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=979.658 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=569.381 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=509.185 ms
...
12:31:35.200868 IP 10.8.0.10 > 192.168.1.1: ICMP echo request, id 3286, seq 4, length 64
12:31:35.647585 IP 192.168.1.1 > 10.8.0.10: ICMP echo reply, id 3286, seq 4, length 64
Code: Select all
$ cat /proc/sys/net/ipv4/ip_forward
1
Code: Select all
port 1194
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/mom_server.crt
key /etc/openvpn/keys/mom_server.key # This file should be kept secret
dh /etc/openvpn/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.1.0 255.255.255.0"
client-config-dir /etc/openvpn/ccd #contains "iroute 192.168.3.0 255.255.255.0" in client1 file
client-to-client
route 192.168.3.0 255.255.255.0
keepalive 10 120
comp-lzo
user nobody
chroot /etc/openvpn
group nogroup
daemon
up ./openvpn.up # this is empty at the moment
persist-key
persist-tun
status openvpn-status.log
verb 3
Any help would be greatly appreciated.
Alex