当前位置: 移动技术网 > 科技>操作系统>Linux > Linux配置防火墙端口 8080端口

Linux配置防火墙端口 8080端口

2019年01月25日  | 移动技术网科技  | 我要评论

1、查看防火墙状态,哪些端口开放了

/etc/init.d/iptables status

2、配置防火墙

vi /etc/sysconfig/iptables   ######################################  # firewall configuration written by system-config-firewall  # manual customization of this file is not recommended.  *filter  :input accept [0:0]  :forward accept [0:0]  :output accept [0:0]  -a input -m state –state established,related -j accept  -a input -p icmp -j accept  -a input -i lo -j accept  -a input -m state –state new -m tcp -p tcp –dport 22 -j accept  -a input -m state –state new -m tcp -p tcp –dport 80 -j accept  -a input -m state –state new -m tcp -p tcp –dport 8080 -j accept  -a input -j reject –reject-with icmp-host-prohibited  -a forward -j reject –reject-with icmp-host-prohibited  commit  #####################################

#最后重启防火墙使配置生效

/etc/init.d/iptables restart 

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网