0关闭防火墙

yum -y install iptables-services

图片 1

-A FORWARD -j REJECT –reject-with icmp-host-prohibited

-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT

Linux防火墙iptables详解 
http://www.linuxidc.com/Linux/2016-12/138474.htm

:FORWARD ACCEPT [0:0]

systemctl enable iptables.service #安装防火墙开机运行

Linux下编写翻译安装iptables 
http://www.linuxidc.com/Linux/2017-04/142615.htm

:INPUT ACCEPT [0:0]

本文永恒更新链接地址:http://www.linuxidc.com/Linux/2016-03/129425.htm

越来越多iptables相关学科见以下内容

# Firewall configuration written by system-config-firewall

Linux下防火墙iptables用法律则详解
http://www.linuxidc.com/Linux/2012-08/67952.htm

:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT
 
封存退出

CentOS
七.0暗许使用的是firewall作为防火墙,这里改为iptables防火墙。

iptables使用表率详解
http://www.linuxidc.com/Linux/2014-03/99159.htm

三、重启防火墙
systemctl restart iptables.service      #聊到底重启防火墙使配置生效
systemctl enable iptables.service    #安装防火墙开机运行

systemctl stop firewalld.service #停止firewall

Linux防火墙iptables详细教程
http://www.linuxidc.com/Linux/2013-07/87045.htm

Iptables工作规律使用详解
http://www.linuxidc.com/Linux/2016-09/134945.htm

-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

更加多iptables相关学科见以下内容

1、关闭firewall
systemctl stop firewalld.service                #停止firewall
systemctl disable firewalld.service          #明确命令禁止firewall开机运营

:wq! #保存退出

充实规则

CentOS7下iptables配置进度
http://www.linuxidc.com/Linux/2017-01/139622.htm

-A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图