route particualar hosts through vpn tunnel openswan
hi
i configured openswan between two ubuntus and working fine, now my requirement is i need to route few of my public ip traffic via vpn tunnel, i mean lets say my servers are
ubuntu 1 >> VPN OPENSWAN >> ubuntu 2
now if i ping x.x.x.x (my public ip) from ubuntu 1 it shouldn't go via public interface, it shoud go lik
>>>>> ubuntu 1 >>> vpn tunnel >> ubuntu 2 >>>> x.x.x.x
please help me , i added route on ubutnu 1
route add -host x.x.x.x dev eth0(vpn interface)
but not pinging, i ran tcpdump on ubuntu 2 but traffic not reaching, i also enabled masquerade and ip_forwarding on ubutu 2
please help me out.
|