centos6.9 终极版, setup没有防火墙设置gui

安装:

#安装Setup命令工具
yum -y install setuptool   
#安装Setup工具配套的系统服务组件
yum -y install ntsysv   
#安装Setup工具配套的防火墙配置组件
yum -y install system-config-securitylevel-tui
#安装Setup工具配套的网络配置组件
yum -y install system-config-network-tui 
#安装Setup工具配套的验证配置组件
yum -y install authconfig-gtk
#安装Setup工具配套的键盘配置组件
yum -y install system-config-keyboard

使用:

setup

开始配置防火墙, 报错:

ERROR: FirewallD is active, please use firewall-cmd.提示使用firewall-cmd:

方法:

Open a Port on CentOS/RHEL 7
Starting with CentOS and RHEL 7, firewall rule settings are managed by firewalld service daemon. A command-line client called firewall-cmd can talk to this daemon to update firewall rules permanently.

To open up a new port (e.g., TCP/80) permanently, use these commands.

//执行命令

$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent(永久)
$ sudo firewall-cmd --reload
Without "--permanent" flag, the firewall rule would not persist across reboots.


[root@localhost ~]# firewall-cmd --query-port=21/tcp (查看端口状态)
no
[root@localhost ~]# firewall-cmd --zone=public --add-port=21/tcp(临时添加端口)
success
[root@localhost ~]# firewall-cmd --reload(重启后关闭)
success
[root@localhost ~]# firewall-cmd --query-port=21/tcp
no

 

推荐阅读:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html

https://www.5yun.org/10074.html

转载于:https://my.oschina.net/champions/blog/1614170

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值