Configuring IP-IP tunnel between two linux VPS

Posted on Posted in IT

VPS1:

ip tunnel add tun0 mode ipip remote a.a.a.a local b.b.b.b dev eth0
ifconfig tun0 10.0.0.1 netmask 255.255.255.252 pointopoint 10.0.0.2
ifconfig tun0 mtu 1500 up

VPS2:

ip tunnel add tun1 mode ipip remote b.b.b.b local a.a.a.a dev eth0
ifconfig tun1 10.0.0.2 netmask 255.255.255.252 pointopoint 10.0.0.1
ifconfig tun1 mtu 1500 up

done

PS: don`t forget to secure data, that will be unencrypted tunnel

Leave a Reply