106.13.41.87
ssserver -c /etc/shadowsocks.json -d start
telnet 106.13.41.87 port
telnet 106.13.41.87 22
查看系统是否安装防火墙
root@localhost:/usr# which iptables
root@localhost:/usr# whereis iptables
安装iptables
root@localhost:~# apt-get install iptables
安装iptables
apt-get install nmap
nmap 127.0.0.1 -p 5053 # 探测 端口状态,(open, closed. filtered)
(1)查看本机关于IPTABLES的设置情况
[root@tp ~]# iptables -L -n
(2)清除原有规则.
不管你在安装linux时是否启动了防火墙,如果你想配置属于自己的防火墙,那就清除现在filter的所有规则.
[root@tp ~]# iptables -F 清除预设表filter中的所有规则链的规则
[root@tp ~]# iptables -X 清除预设表filter中使用者自定链中的规则
这样就可以写到/etc/sysconfig/iptables文件里了.写入后记得把防火墙重起一下,才能起作用.
[root@tp ~]# iptables-restore < /etc/iptables.test.rules
(3)设定预设规则
[root@tp ~]# iptables -P INPUT DROP
[root@tp ~]# iptables -P OUTPUT ACCEPT
[root@tp ~]# iptables -P FORWARD DROP
(4)添加规则
如果做了WEB服务器,开启80端口.
[root@tp ~]# iptables -A INPUT -p tcp —dport 8399 -j ACCEPT