Asuswrt official iptables-save not saving changes permanently

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:

ColinTaylor

Part of the Furniture
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.
 

savage75

Occasional Visitor
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 ?
 

savage75

Occasional Visitor
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
 

savage75

Occasional Visitor
ok thanks but could you describe how can I add the role above as a route? because I tried it before but no luck.
 

savage75

Occasional Visitor
here is the route looks like what I need to add for GW, Metric and Interface?

1669069858331.png
 

Coal

New Around Here
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
 

Similar threads

Sign Up For SNBForums Daily Digest

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