What's new

Asuswrt official iptables-save not saving changes permanently

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

savage75

Occasional Visitor
Hi folks!
Trying to set a rule on iptables for nat permanently but no luck ?

iptables -t nat -A POSTROUTING -s 10.2.0.0/24 -o br0 -j MASQUERADE

I tried using

iptables-save -t nat

or just
iptables-save

but still no success and every changes will disappear after restarting ??

any ideas how I can solve this ?

thanks
 
Last edited:
iptables-save does not "save" anything. It just dumps the rules so that they might be read by a human or another process.


Starting any line with a # character means that it's a comment and what follows on that line is ignored. So the following two lines do nothing at all:
Code:
#iptables-save -t nat
# blah blah blah

I'm not aware of a way on stock firmware of making permanent changes to the firewall rules.
 
iptables-save does not "save" anything. It just dumps the rules so that they might be read by a human or another process.


Starting any line with a # character means that it's a comment and what follows on that line is ignored. So the following two lines do nothing at all:
Code:
#iptables-save -t nat
# blah blah blah

I'm not aware of a way on stock firmware of making permanent changes to the firewall rules.
ahha! sorry that was a mistyped. I don't run these commands by # so thats not the issue.

so if I understand right there is no way to solve this ?
 
I'm running wireguard vpn and it needs changes for nat so I can reach my local network connected devices
is there a way to run this when the connection to the VPN is UP?

iptables -t nat -A POSTROUTING -s 10.2.0.0/24 -o br0 -j MASQUERADE

or any other suggestions
 
ok thanks but could you describe how can I add the role above as a route? because I tried it before but no luck.
 
here is the route looks like what I need to add for GW, Metric and Interface?

1669069858331.png
 
but still no success and every changes will disappear after restarting ??

any ideas how I can solve this ?
For anyone wondering I posted the solution here
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top