查看防护墙状态 :service iptables status
防护墙开启 : service iptables start
防护墙关闭:service iptables stop
两台服务器 A服务器正常状态 B服务器防火墙关闭,从A服务器访问B服务器的8090端口
在B服务器上指定添加一条端口 如下 :
iptables -I INPUT -s A -ptcp --dport 8090 -j ACCEPT
远程连接的服务器大家注意不要随便关闭 INPUT 执行 iptables -P INPUT DROP 这句一定要确认好关闭了之后还能访问服务器不