stellr
(Ray Stell)
June 4, 2020, 12:52pm
1
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
stellr
(Ray Stell)
June 4, 2020, 1:51pm
3
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.
use firewall-config and set your rules.
Then under “Options” click “Runtime To Permanent”
stellr
(Ray Stell)
June 6, 2020, 12:11pm
6
Trying to dig into nft, but firewalld rich-rules do not seem to work. Where is the best place to ask for nft help?
stellr
(Ray Stell)
June 6, 2020, 3:38pm
8
thanks all, I’ll start a another thread here and see if I can flatten the learning curve.
1 Like
system
(system)
Closed
July 4, 2020, 3:39pm
9
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.