信息:

[root@***** ~]# firewall-cmd --list-rich-rules

[root@***** ~]# 
[root@***** ~]# firewall-cmd --add-rich-rule 'rule family=ipv4 forward-port port=514 protocol=tcp to-port=5514'
success
[root@***** ~]# 
[root@***** ~]# firewall-cmd --list-rich-rules
rule family="ipv4" forward-port port="514" protocol="tcp" to-port="5514"
[root@***** ~]# 
[root@***** ~]# firewall-cmd --add-rich-rule 'rule family=ipv4 forward-port port=514 protocol=udp to-port=5514'
success
[root@***** ~]# 
[root@***** ~]# firewall-cmd --list-rich-rules
rule family="ipv4" forward-port port="514" protocol="tcp" to-port="5514"
rule family="ipv4" forward-port port="514" protocol="udp" to-port="5514"
[root@***** ~]# 

[root@***** ~]# firewall-cmd --add-port=5514/tcp
success
[root@***** ~]# 
[root@***** ~]# firewall-cmd --query-port=5514/tcp --zone=public
yes
[root@***** ~]# 
[root@***** ~]# firewall-cmd --add-port=5514/udp
success
[root@***** ~]# 
[root@***** ~]# firewall-cmd --query-port=5514/tcp --zone=public
yes
[root@***** ~]# 
[root@***** ~]# firewall-cmd --add-port=514/tcp
success
[root@***** ~]# firewall-cmd --add-port=514/udp
success
[root@***** ~]# 
[root@***** ~]# firewall-cmd --query-port=514/tcp
yes
[root@***** ~]# firewall-cmd --query-port=514/udp
yes
[root@***** ~]# 

[root@***** ~]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens160
  sources: 
  services: ssh dhcpv6-client
  ports: 5514/tcp 5514/udp 514/tcp 514/udp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
        rule family="ipv4" forward-port port="514" protocol="tcp" to-port="5514"
        rule family="ipv4" forward-port port="514" protocol="udp" to-port="5514"
[root@***** ~]# 
[root@***** ~]# 

————————
Done

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒