G
G
gremlintv22017-07-29 11:11:39
bash
gremlintv2, 2017-07-29 11:11:39

How to save iptables rules permanently in Fedora 26?

I found an article:
https://bash.cyberciti.biz/firewall/linux-iptables... I
did everything as described: (saved the script, made it executable, added the line /root/scripts/start.fw to /etc/rc. local) but after a reboot the rules are changed to default.
Added the same script to /etc/init.d, rebooted - didn't help.
I run the script, the rules change, I enter iptables-save, I reboot - it does not help.
What other options are I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dummyman, 2017-07-29
@gremlintv2

It is possible that iptables is generating firewalld enabled
See if firewalld
is enabled If enabled, disable:
Enable iptables

dnf install iptables-services
systemctl mask firewalld.service
systemctl enable iptables.service
systemctl enable ip6tables.service
Most find firewalld easier than iptables configs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question