Skip to content

Instantly share code, notes, and snippets.

@li-ch
Last active October 19, 2016 06:27
Show Gist options
  • Save li-ch/4e0687fb48902c7b66d3c2d28bbd570b to your computer and use it in GitHub Desktop.
Save li-ch/4e0687fb48902c7b66d3c2d28bbd570b to your computer and use it in GitHub Desktop.
Correctly conifgured ssh tunneling.
li@sing:~$ sudo ssh -S /var/run/ssh-tun2-tunnel-control -M -f -w 2:2 143.89.191.40 true
li@sing:~$ ip route show
default via 143.89.244.126 dev eth0
10.2.0.1 dev tun2 proto kernel scope link src 10.2.0.2
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
143.89.244.64/26 dev eth0 proto kernel scope link src 143.89.244.107
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.254
192.168.2.0/24 via 10.2.0.1 dev tun2
192.168.14.0/24 dev eth2 proto kernel scope link src 192.168.14.254
li@sing:~$ sudo ifconfig -a
...
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:480 (480.0 B)
tun2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.2.0.2 P-t-P:10.2.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:36974 (36.1 KiB) TX bytes:13702 (13.3 KiB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment