Skip to content

Instantly share code, notes, and snippets.

@oxyflour
Last active January 15, 2024 08:41
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save oxyflour/32102e94941f7cf76457e2e0f1eecab8 to your computer and use it in GitHub Desktop.
Save oxyflour/32102e94941f7cf76457e2e0f1eecab8 to your computer and use it in GitHub Desktop.
how to setup non-root ssh vpn tunnel
# remember to add
#PermitTunnel yes
# in /etc/ssh/sshd_config
# create tun device on both machines
# ref: http://www.k336.org/2013/04/non-root-ssh-vpn.html
sudo ip tuntap add dev tun0 mode tun user oxyflour group oxyflour
# delete tun
sudo ip tuntap del dev tun0 mode tun
# setup tun
# ref https://help.ubuntu.com/community/SSH_VPN
sudo ip link set tun0 up
sudo ip addr add 192.168.22.2/32 peer 192.168.22.1 dev tun0
# login with the created tun
ssh vlr -w 0:0
@waflessnet
Copy link

Gracias !! me sirvió mucho !!
Saludos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment