Can't route specific subnet thru VPN in ubuntu
- by Disco
I'm having issues routing traffic thru VPN.
Here's my setup
I have 3 hosts, let's call them A, B and Z
B and Z have a VPN connection in the 10.10.10.x SUBNET
A and B have a direct connection in the 10.10.12.x SUBNET
I want to be able to route traffic from A to Z, like :
A <= 10.10.12.254 [LAN] 10.10.12.111 => B <= 10.10.10.152 [VPN] 10.10.10.10 => Z
On host B, i have set up ip_forwarding : net.ipv4.ip_forward = 1
and routing on host B:
[root@hostA: ~]# ip route
10.10.10.10 dev ppp0 proto kernel scope link src 10.10.10.152
10.10.12.0/24 dev eth1 proto kernel scope link src 10.10.12.111
10.10.10.0/24 dev ppp0 scope link
169.254.0.0/16 dev eth1 scope link
routing on host A:
[root@hostA: ~]# ip route
10.10.10.0 via 10.10.12.111 dev eth1
10.10.12.0/24 dev eth1 proto kernel scope link src 10.10.12.254
169.254.0.0/16 dev eth1 scope link
default via 192.168.1.1 dev eth0
But still not able to ping 10.10.10.10 from host A.
Any idea ? I'm pulling my hairs out.