Skip to content

Instantly share code, notes, and snippets.

@tom-code
Created January 22, 2023 11:40
Show Gist options
  • Save tom-code/af91734b269d0505c66a824808e801cf to your computer and use it in GitHub Desktop.
Save tom-code/af91734b269d0505c66a824808e801cf to your computer and use it in GitHub Desktop.
ssh -o ProxyCommand="corkscrew ng-dpx01.intinfra.com 3128 <home ip> 443" -o 'RemoteForward=localhost:23 localhost:22' root@localhost
connect bak:
ssh \
-o PermitLocalCommand=yes \
-o LocalCommand="ifconfig tun5 192.168.244.2 pointopoint 192.168.244.1 netmask 255.255.255.0" \
-o ServerAliveInterval=60 \
-w 5:5 root@localhost -p 23 \
'ifconfig tun5 192.168.244.1 pointopoint 192.168.244.2 netmask 255.255.255.0; echo tun0 ready'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment