提问人:Andreas 提问时间:2/20/2023 最后编辑:marc_sAndreas 更新时间:6/7/2023 访问量:151
配置 firewalld (Rocky linux 9)
Configuring firewalld (Rocky linux 9)
问:
经过一番苦心,我设法配置了firewalld,以便我只允许给定的IP号码的特定服务。
现在我想向 https/447 提供对所有 IP 的访问权限。但我不知道该怎么做。下面列出了我当前的配置。
# firewall-cmd --get-active-zones
customzone
sources: ipset:Trusted_IP_all
drop
interfaces: enp0s31f6
放置区:
# more drop.xml
<?xml version="1.0" encoding="utf-8"?>
<zone target="DROP">
<short>Drop</short>
<description>Unsolicited incoming network packets are dropped.</description>
<forward/>
</zone>
和 customzone:
# more customzone.xml
<?xml version="1.0" encoding="utf-8"?>
<zone target="DROP">
<short>Custom Zone Configuration</short>
<description>All incoming connections are blocked by default. </description>
<service name="ssh"/>
<service name="http"/>
<service name="https"/>
<source ipset="Trusted_IP_all"/>
</zone>
“Trusted_IP_all”包含选定的几个 IP-nr/范围
答:
0赞
erig
6/7/2023
#1
听起来您想打开端口 447/tcp。
# firewall-cmd --permanent --zone customzone --add-port 447/tcp
评论