iptables替换firewalld
来源:互联网 发布:linux修改ftp用户密码 编辑:程序博客网 时间:2024/06/05 10:08
1、关闭firewalld
systemctl stop firewalld.service
systemctl disable firewalld.service
2、安装
yum install iptables-services
3、修改配置
vim /etc/sysconfig/iptables
-------------start----------
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
: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 -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
-------------end----------------
4、启动并设置开机启动
systemctl restart iptables.service
systemctl enable iptables.service
- iptables替换firewalld
- CentOS7 默认防火墙firewalld替换为iptables
- centos7的一些变化,firewalld替换iptables、systemctl 替换service
- iptables&firewalld
- iptables firewalld
- firewalld&iptables
- iptables& firewalld
- firewalld & iptables
- firewalld & iptables
- iptables&firewalld
- Iptables与Firewalld防火墙
- firewalld(iptables)
- 06-IPTABLES.FIREWALLD防火墙
- firewalld和iptables
- iptables&firewalld防火墙
- Iptables与Firewalld防火墙
- firewalld and iptables
- firewalld and iptables
- ionic的ion-tabs和ion-side-menus
- 经典的print_table学习
- 第3章——表、栈和队列
- mysql之连表查询:LEFT JOIN、RIGHT JOIN、INNER JOIN。
- Testdisk 操作指南
- iptables替换firewalld
- Scrollview嵌套百度地图MapView导致滑动有黑边或者阴影问题
- opencv Camshift
- java-面试题
- Android 文件打开方法
- 新手使用PHP制作日历
- Spark性能调优(一)
- C++标准库笔记:13.11 String Stream Classes
- leetcode541. Reverse String II