vpn-with-ssh-tunnel.md hinzugefügt
This commit is contained in:
parent
63de574f8a
commit
a32a9432f7
1 changed files with 17 additions and 0 deletions
17
vpn-with-ssh-tunnel.md
Normal file
17
vpn-with-ssh-tunnel.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
```
|
||||
# tun device lokal anlegen für den user
|
||||
$ ip tuntap add mode tun user mhanisch name tun0
|
||||
|
||||
# ip addresse vergeben
|
||||
$ ip a add 10.12.34.1/30 dev tun0
|
||||
|
||||
# tun device lokal anlegen auf der gegenseite
|
||||
$ ip tuntap add mode tun user root name tun0
|
||||
$ ip a add 10.12.34.2/30 dev tun0
|
||||
|
||||
# tunnel in sshd auf gegenseite in /etc/ssh/sshd_config erlauben
|
||||
$ echo "PermitTunnel yes" >> /etc/ssh/sshd_config
|
||||
|
||||
# per ssh tunnel verbindung aufbauen
|
||||
$ ssh -w 0:0 root@1.2.3.4
|
||||
```
|
Loading…
Reference in a new issue