Iptables missing files?

Just starting out with fedora 32. I don’t know firewalld well enough yet, so I added rules to iptables just to get started. However, the files in /etc/sysconfig discussed below are missing. How can these be installed? I’d like my rules to persist over a reboot.

In the default configuration, stopping or restarting the iptables service will discard the running configuration. This behavior can be changed by setting IPTABLES_SAVE_ON_STOP="yes" or IPTABLES_SAVE_ON_RESTART="yes" in /etc/sysconfig/iptables-config .

https://docs.fedoraproject.org/en-US/quick-docs/how-to-edit-iptables-rules/

I know to learn firewalld, it’s on the list.

If I am not wrong, in Fedora 32, iptables was replaced with nftables.

See:

2 Likes

Kind of confusing as iptables is functional, but I see your point, it seems to be getting buried:

# which iptables
/usr/sbin/iptables

# ls -lt /usr/sbin/iptables
lrwxrwxrwx. 1 root root 26 Apr 22 18:35 /usr/sbin/iptables -> /etc/alternatives/iptables
alternatives]# ls -lt iptables
lrwxrwxrwx. 1 root root 25 Apr 22 18:35 iptables -> /usr/sbin/iptables-legacy

# ls -lt /usr/sbin/xtables-legacy-multi
-rwxr-xr-x. 1 root root 102360 Feb 12 16:27 /usr/sbin/xtables-legacy-multi

However, it works, it’s just not persistent. I guess I’ll just have to learn some new stuff to get the fw rules to survive a reboot.

OK, lazy me, is there any way to get iptables rules to persist while I’m digging into firewalld and nftables?

Again, many thanks for getting me off the ground.

Fedora uses firewalld, so best to look into that:

1 Like

use firewall-config and set your rules.
Then under “Options” click “Runtime To Permanent”

Trying to dig into nft, but firewalld rich-rules do not seem to work. Where is the best place to ask for nft help?

There’s a lot of info in these pages, but I don’t really see ways to ask for help:

https://netfilter.org/projects/nftables/

https://wiki.nftables.org/wiki-nftables/index.php/Main_Page

thanks all, I’ll start a another thread here and see if I can flatten the learning curve.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.