美文网首页
七、sshuttle使用

七、sshuttle使用

作者: 此间有道 | 来源:发表于2020-11-11 10:43 被阅读0次

一、使用命令

执行sudo sshuttle -l 8888 123.232.110.116/32 -r root@10.170.223.247

执行过程

二、查看结果:

  1. 查看NAT sudo iptables --list -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
sshuttle-8888  all  --  anywhere             anywhere            
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
sshuttle-8888  all  --  anywhere             anywhere            
DOCKER     all  --  anywhere            !localhost/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  172.17.0.0/16        anywhere            
MASQUERADE  all  --  172.19.0.0/16        anywhere            
MASQUERADE  tcp  --  172.19.0.2           172.19.0.2           tcp dpt:mysql

Chain DOCKER (2 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            
DNAT       tcp  --  anywhere             anywhere             tcp dpt:mysql to:172.19.0.2:3306

Chain sshuttle-8888 (2 references)
target     prot opt source               destination         
RETURN     tcp  --  anywhere             https://account.jetbrains.com:443 
REDIRECT   tcp  --  anywhere             123.232.110.116      TTL match TTL != 42 redir ports 8888
  1. 查看端口监听netstat -np | grep 10.170.223.247
tcp        0      0 192.168.137.19:39792    10.170.223.247:22       ESTABLISHED -

相关文章

网友评论

      本文标题:七、sshuttle使用

      本文链接:https://www.haomeiwen.com/subject/fchebktx.html