HostA is on the 192.168.5.0/24 network with address 192.168.5.22(eth0) and has a vpn adapter address of 192.168.15.2(tun0)
HostB is on the 192.168.1.0/24 network with address 192.168.1.22(eth0) and has a vpn adapter address of 192.168.15.1(tun0)
The routing table on HostA (office)
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.1 * 255.255.255.255 UH 0 0 0 tun0
192.168.5.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.15.1 255.255.255.0 UG 0 0 0 tun0
default 192.168.5.253 0.0.0.0 UG 0 0 0 eth0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.5.0 192.168.15.2 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Code: Select all
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Code: Select all
cat /proc/sys/net/ipv4/ip_forward
1
Thanks guys..


