username667
New Around Here
I've been struggling with the High NVRAM usage for a while, but it's largely been under control manually running the one line command to sort it out a few minutes after boot.
However, since 386.9 on an AC68U, I have this "cool" issue where my port forwarding rules are blank on reboot. I see that Eric pointed out in another post that high NVRAM can do this. However, I have a bit of a circular problem - port forwarding table is dropped with high NVRAM, but I can't clear the NVRAM until after the router has booted, which seems to consistently clear my port forwarding table. Manual entry is a pain, and if someone ever has to reboot the router when I'm not around, a bunch of external stuff doesn't work until I get home and re-enter the rules in the GUI.
Not one to admit defeat easily, I've spent some time working out and testing the exact iptables commands to get my port forwarding table into a script. It works a treat from a technical standpoint, I now have a script to clear NVRAM and another script to add the port forward entries into the VSERVER chain on the NAT table.
For example:
This rule replicates and works as other manually added ones in the web GUI, but this particular rule doesn't show up in the GUI. It might be because it's missing a "Service Name" as that doesn't appear to be specifiable at the command line, I'm a bit stumped on this last piece of the puzzle. Anyone happen to know how to add the port forwarding line at the command line and have it appear in the GUI?
Granted, it's a nice to have, I don't need the lines to appear in the GUI and I could just use the command line to administer all NAT rules as they do work. But if anyone has any ideas on the missing piece of the puzzle, then I could script something that could be administered in both command line and GUI. I also have the option of going back to 386.8 or earlier to solve this slight annoyance. I've cut back significantly on services, and I'm down to a bare minimum I can run, hence these workarounds.
Thanks in advance.
However, since 386.9 on an AC68U, I have this "cool" issue where my port forwarding rules are blank on reboot. I see that Eric pointed out in another post that high NVRAM can do this. However, I have a bit of a circular problem - port forwarding table is dropped with high NVRAM, but I can't clear the NVRAM until after the router has booted, which seems to consistently clear my port forwarding table. Manual entry is a pain, and if someone ever has to reboot the router when I'm not around, a bunch of external stuff doesn't work until I get home and re-enter the rules in the GUI.
Not one to admit defeat easily, I've spent some time working out and testing the exact iptables commands to get my port forwarding table into a script. It works a treat from a technical standpoint, I now have a script to clear NVRAM and another script to add the port forward entries into the VSERVER chain on the NAT table.
For example:
Code:
#Allow SSH from anywhere
iptables -t nat -I VSERVER 1 -p tcp --dport 22 -j DNAT --to-destination 192.168.1.35:2222
This rule replicates and works as other manually added ones in the web GUI, but this particular rule doesn't show up in the GUI. It might be because it's missing a "Service Name" as that doesn't appear to be specifiable at the command line, I'm a bit stumped on this last piece of the puzzle. Anyone happen to know how to add the port forwarding line at the command line and have it appear in the GUI?
Granted, it's a nice to have, I don't need the lines to appear in the GUI and I could just use the command line to administer all NAT rules as they do work. But if anyone has any ideas on the missing piece of the puzzle, then I could script something that could be administered in both command line and GUI. I also have the option of going back to 386.8 or earlier to solve this slight annoyance. I've cut back significantly on services, and I'm down to a bare minimum I can run, hence these workarounds.
Thanks in advance.