Sample Header Ad - 728x90

SSH tunnel error: sys_tun_open: failed to configure tunnel (mode 1): Invalid argument

0 votes
0 answers
105 views
I'm trying to create a SSH tunnel between 2 Raspberry PI's both running Debian Bookworm. I try to establish the connection using the command sudo ssh -w0:0 @ -p true But it fails with
...
debug1: Requesting tun unit 0 in mode 1
debug1: sys_tun_open: failed to configure tunnel (mode 1): Invalid argument
Tunnel device open failed.
Could not request tunnel forwarding.
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
...
I've changed the below config files
/etc/ssh/sshd_config

PermitTunnel yes
/etc/ssh/ssh_config

Tunnel point-to-point
/etc/sysctl.conf

net.ipv4.ip_forward = 1
The tun0 interface is created on both devices using sudo nmtui
tun0: flags=209  mtu 1480
        inet   netmask 255.255.255.252  destination 
        tunnel   txqueuelen 1000  (IPIP Tunnel)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Can anybody help me getting this error fixed?
Asked by user613537 (1 rep)
Jun 8, 2024, 09:18 AM
Last activity: Jun 8, 2024, 10:15 AM