在ufw等同于firewalld富有的规则

为了控制iptables ,我停止使用firewalld ,而是使用ufw

我需要应用这些规则,但使用ufw

 firewall-cmd --zone=dmz --permanent --add-rich-rule='rule protocol value="esp" accept' # ESP (the encrypted data packets) firewall-cmd --zone=dmz --permanent --add-rich-rule='rule protocol value="ah" accept' # AH (authenticated headers) firewall-cmd --zone=dmz --permanent --add-port=500/udp #IKE (security associations) firewall-cmd --zone=dmz --permanent --add-port=4500/udp # IKE NAT Traversal (IPsec between natted devices) 

我知道最后两个很容易,因为如果ufw allow 500/udp, ufw allow 4500/udp

如何翻译前两个丰富的规则?

我会尝试类似的

 ufw allow proto esp from any ufw allow proto ah from any 

和相应的规则

 ufw allow proto esp to any ufw allow proto ah to any