Ssh VPN: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
 
=Client=
 
=Client=
*ssh -w 0:0 root@server -fN
+
*SERVER=example.com
 +
*ssh -w 0:0 root@$SERVER -fN
 
*ip link set tun0 up
 
*ip link set tun0 up
*ssh root@server ip link set tun0 up
+
*ssh root@$SERVER ip link set tun0 up
 
*ip addr add 192.168.88.1/24 dev tun0
 
*ip addr add 192.168.88.1/24 dev tun0
*ssh  root@tcpdump.de ip addr add 192.168.88.2/24 dev tun0
+
*ssh  root@$SERVER ip addr add 192.168.88.2/24 dev tun0
 
=Server=
 
=Server=
 
;Vorraussetzung
 
;Vorraussetzung
 
*cat /etc/ssh/sshd_config
 
*cat /etc/ssh/sshd_config
 
  PermitTunnel yes
 
  PermitTunnel yes

Version vom 2. November 2022, 08:29 Uhr

Client

  • SERVER=example.com
  • ssh -w 0:0 root@$SERVER -fN
  • ip link set tun0 up
  • ssh root@$SERVER ip link set tun0 up
  • ip addr add 192.168.88.1/24 dev tun0
  • ssh root@$SERVER ip addr add 192.168.88.2/24 dev tun0

Server

Vorraussetzung
  • cat /etc/ssh/sshd_config
PermitTunnel yes