说明:CentOS 7
默认使用的是firewall
作为防火墙,使用iptables
必须重新安装设置一下。如果不想太麻烦可参考:CentOS 7开放设置端口及firewall常用命令介绍。
1、直接关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、安装并设置iptables service
yum -y install iptables-services
如果要修改防火墙配置,如增加防火墙端口3306
vi /etc/sysconfig/iptables
增加规则
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
保存退出后
systemctl restart iptables.service #重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
最后重启系统使设置生效即可。
更多有关iptables
使用请看:Linux防火墙iptables基本应用。
未经允许不得转载:嘟嘟 » CentOS 7使用iptables开放设置端口
最新评论
请问下,python3 tg_username_update.py都会提示下面这个是因为什么啊 Traceback (most recent call last): File "tg_username_update.py", line 21, in <module> cake = emojize(":cake:", use_aliases=True) TypeError: emojize() got an unexpected keyword argument 'use_aliases'
不可以了
# Install [Debian] [bullseye] [amd64] Downloading... grep: (standard input): binary file matches Error! grub.cfg. root@RRR2:~#
博主你好,请问cloudfront 上传收费这个是事实吧,已经找了几个贴子确认了。 那有什么好办法能够避开这个收费呢?如果不能避开感觉还是cloudflare 比较稳。
来看看
第5步添加自定义主机名进去后等txt验证提示custom hostname does not name to this zone
那没事了,我静态博客。谢谢
为什么缓存键和源请求那里不设置缓存?