Warning: using this wrong may result in becoming an open relay!
Note the escaping of the colon in the remote command.
SYSTEM:"ssh root@remote-server socat -d -d  - 'TUN:192.168.99.1/24,up'"
socat -d -d \ TUN:192.168.99.2/24,up \ SYSTEM:"ssh root@remote-server socat -d -d - 'TUN:192.168.99.1/24,up'"
This must be run as a user that can modify tap/tun devices on both sides of the tunnel.
EXEC:"ssh root@remote-server socat - /dev/ttyS0"
socat PTY,link=$HOME/vmodem0,waitslave \ EXEC:"ssh root@remote-server socat - /dev/ttyS0"
You can now access remote /dev/ttyS0 through local $HOME/vmodem0. Remove waitslave to keep alive after local client disconnect.
This uses a chaining method I believe to be only available in socat2.
Dit bericht werd geplaatst in IT, Networking en getagged met Linux, networking, socat, sockets op december 23, 2011 door David (admin).