Linux配置防火墙端口 8080端口
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
推荐阅读
-
linux修改tomcat端口号命令(修改tomcat的步骤)
-
linux修改tomcat端口号命令(linux入门基础教程)
-
linux修改tomcat端口号命令(修改tomcat的步骤)
-
iis与apache共用80端口配置方法
-
linux配置防火墙iptables实例分享
-
linux修改ssh端口的二种方法
-
linux配置防火墙详细步骤(iptables命令使用方法)
-
linux下mysql开启远程访问权限 防火墙开放3306端口
-
linux 学习第十四天(Apache安装、基于ip、基于域名、基于端口配置)
-
SUSE Linux Enterprise Server 设置防火墙开启ssh远程端口的方法