linux过滤防火墙

linux设置过滤防火墙

 

方法一:

linux永久关闭防火墙命令:

chkconfig iptables off# 关闭防火墙

chkconfig iptables on# 开启防火墙

方法二:service命令只能暂时关闭防火墙

service iptables restart #重启防火墙
service iptables stop #启动防火墙
service iptables start #启动防火墙

方法三:修改配置文件设置特定端口过滤防火墙

编辑:vim etc/sysconfig/iptables配置文件

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT #设置特定端口过滤防火墙 22

 

posted @ 2021-09-12 10:54  多测师-星sir  阅读(171)  评论(0)    收藏  举报