linux防火墙的端口操作

开启:
iptables -I INPUT -p tcp --dport 8161 -j ACCEPT #开启8011端口

关闭:

iptables -I INPUT -p tcp --dport 8070 -j DROP #关闭8011端口

service iptables status 查看防火墙状态
service iptables start 开启防火墙
service iptables stop 关闭防火墙
service iptables restart 重启防火墙

猜你喜欢

转载自www.cnblogs.com/zhjx0521/p/9337851.html