SSH VPN recipe

Sep 01, 2011 11:24

SSH options for $remote

PermitRootLogin yes
PermitTunnel yes

As root@$local

ssh -w 0:0 root@$remote 'while true; do echo "[$(date)] $(uptime)"; sleep 10; done'
ifconfig tun0 192.168.1.2/30 192.168.1.1

As root@$remote

ifconfig tun0 192.168.1.1/30 192.168.1.2

This will set the remote endpoint to 192.168.1.2 and the local endpoint to 192.168.1.1.
Previous post
Up