mardi 16 décembre 2014

ssh tunnelling : how to mount vpn via ssh...

# on remote server edit /etc/ssh/sshd_config and add
 PermitTunnel yes

# restart ssh
sudo service ssh restart

 #From local computer connect to the remote server (ex : VM Virtualbox in my case)
 ssh -D 10998 -vv -N -C -w 0:0 my-remote-server

#on remote serveur (@home)
ifconfig tun0 netmask
ifconfig tun0 up

# verify

# active ip forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

# activate routing
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# on local computer route subnet @home
route add -net netmask gw tun0

# on local windows use local proxy socks on 10998
# exemple with chrome & Falcon Proxy plugin

Aucun commentaire:

Enregistrer un commentaire