OCI: How To Convert iptables to nftables
Applies to:
Oracle Cloud Infrastructure
Linux x86-64
Oracle Linux 8 and above
Goal:
This document outlines the steps required to convert iptables rules to use nftables.
Solution:
1) Disable the firewalld service if it isn't already disabled:$ sudo systemctl disable --now firewalld
2) Clear any preexisting rulesets in nftables created by firewalld:$ sudo nft flush ruleset
3) Display the current status of the firewalld service and ensure that the service is listed as inactive (dead):$ sudo systemctl status firewalld
4) To import the iptables rules, save the rules to a dump file, then use the iptables-restore-translate command to convert the iptables rules to nft format.