使用预装的iptables-translate
程序即可,例如:
1 | # iptables-translate -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT |
nftables
默认没有内置的链,可以自己新增
1 | nft flush ruleset |
参考
- https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/9/html/configuring_firewalls_and_packet_filters/getting-started-with-nftables_firewall-packet-filters
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_firewalls_and_packet_filters/getting-started-with-nftables_firewall-packet-filters#supported-nftables-script-formats_writing-and-executing-nftables-scripts