You are not logged in.

#1 2024-09-13 12:28:41

Nezmar485
Member
Registered: 2024-09-13
Posts: 1

iptables not saving

I was following this https://wiki.archlinux.org/title/Simple … l_firewall guide on iptables. However, having completed all the commands and running # iptables-save -f /etc/iptables/iptables.rules to save it, the rules did in fact not save. The iptable.rules remained completely unchanged.

Offline

#2 2024-09-13 13:01:39

seth
Member
Registered: 2012-09-03
Posts: 59,040

Re: iptables not saving

What's the iptables-save output when not redirecting into file?
Your rules?
What about iptables -nvL ?

Edit: autocorrect starts to annoy me...

Last edited by seth (2024-09-13 13:02:23)

Online

#3 2024-09-13 23:51:39

tvsujal
Member
Registered: 2023-08-11
Posts: 5

Re: iptables not saving

I have the same problem. Just commenting to see a solution later.

Of all the things the Linux kernel does, IP rule-handling seems the crudest and most primitive to me.

Last edited by tvsujal (2024-09-13 23:52:08)

Offline

#4 2024-09-14 05:33:56

seth
Member
Registered: 2012-09-03
Posts: 59,040

Re: iptables not saving

I'm sure that's why almost every router and firewall in the world relies on this... iptables is btw a userspace abstraction of the net filter implementation in the kernel and maintained for legacy reasons. State of the art is nftables but iptables is quite frankly simpler.

Please answer #2 - either you failed to add the filter in the first place (or rebooted afterwards, missing the transient nature of the kernel) or this is a simple "why does sudo foo > bar not work" situation.

Online

Board footer

Powered by FluxBB