Last active
January 15, 2024 08:41
-
-
Save oxyflour/32102e94941f7cf76457e2e0f1eecab8 to your computer and use it in GitHub Desktop.
how to setup non-root ssh vpn tunnel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gracias !! me sirvió mucho !!
Saludos.