ss clinet iptable-rule
如下防火墙规则是将所有发到发送到本机的数据包转发到12345端口通过ss网络传输
Generated by iptables-save v1.4.21 on Wed Jan 18 15:21:04 2017
*nat
:PREROUTING ACCEPT [643456:43756112]
:INPUT ACCEPT [3736441:311742443]
:OUTPUT ACCEPT [25028367:1590201084]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -p tcp -m multiport ! –dports 12346,9090,32200 -j REDIRECT –to-ports 12345
-A PREROUTING -p udp -m multiport ! –dports 3210 -j REDIRECT –to-ports 12345
-A PREROUTING -p tcp -m multiport ! –dports 12346,9090,32200 -j REDIRECT –to-ports 12345
-A PREROUTING -p udp -m multiport ! –dports 3210 -j REDIRECT –to-ports 12345
-A POSTROUTING -j MASQUERADE
-A POSTROUTING -j MASQUERADE
COMMIT
Completed on Wed Jan 18 15:21:04 2017
Generated by iptables-save v1.4.21 on Wed Jan 18 15:21:04 2017
*filter
:INPUT ACCEPT [486938657:283352645536]
:FORWARD ACCEPT [7833764:400122582]
:OUTPUT ACCEPT [480619551:283673452788]
COMMIT
Completed on Wed Jan 18 15:21:04 2017
转载请注明来源链接 http://just4fun.im/2017/01/22/ss-client/ 尊重知识,谢谢:)