OCI: How To Convert iptables to nftables — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Note!! Please register for a free account to access the full content and also to participate in Q&A in the community

OCI: How To Convert iptables to nftables

edited Jul 24, 2025 3:04PM in Linux

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!