
我正在建立一個新伺服器,並且是第一次使用 Firewalld。
我有一個負載平衡器,它接受公共 IP 請求並將它們路由到我的一台具有內部 IP 的伺服器
這些伺服器有公用 IP 和私人 IP。
公共 ip 限制對一個 IP 的訪問,並且有效。
我試圖允許對 192.168.194.138 的所有請求訪問所有端口
我嘗試建立服務 /etc/firewalld/services/internalIP.xml 並將該服務新增至受信任區域,但沒有什麼不同。
除非停用 Firewalld,否則我無法存取 192.168.194.138。
我的公用 IP 在 eth0 上,我的私人 IP 在 eth0:1 上
這是internalIP.xml:
<?xml version="1.0" encoding="utf-8"?>
<service>
<description>Allow all on non-routable ip</description>
<destination ipv4="192.168.194.138" />
</service>
這些是我的區域:
firewall-cmd --zone=public --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client ssh
ports: 220/tcp 10016/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
和
firewall-cmd --zone=trusted --list-all
trusted (active)
target: ACCEPT
icmp-block-inversion: no
interfaces:
sources: 67.my.ip
services: internalIP
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules: