3

I somehow cleared all my iptables rules by accident (details below). In the Web-Access, all settings under "Network->Firewall" are now empty, except for some lines in "Custom Rules" that I had added.

Is there some way to reset only the iptables rules to factory defaults? I have many additional things setup in the router, which is why I would like to avoid having to reset the whole device/OpenWRT, as it would be a lot of work to reset all that.

I can currently no longer access the internet through the router. Strangely enough, I can still SSH into the device from the local network and also access the Web-Access, which I would have thought would not work anymore.

Additional information:

This happened when I was setting up iptables to for OpenVPN following these instructions:

https://arashmilani.com/post?id=53

I added these rules from SSH console and pressed "Apply" in the Web-Access (at the top right). After this, everything worked as expected. Unfortunately in a moment of dimness, I today pressed "Save and Apply" in the Web-Access when I wanted to added the iptables-rules from the link to my custom rules. For some reason, this caused the whole iptables to be cleared (as described above) and I can now no longer access the internet through that router.

I am using OpenWRT version: BARRIER BREAKER (14.07, r42625).

2

I was able to restore my firewall settings by getting the corresponding settings file directly from the OpenWRT GitHub repository here.

The file that I needed was firewall.config. I moved this file to the file /etc/config/firewall on the router using SCP (I made a backup of the current one). After restarting the router the settings in the Web-Access under Network -> Firewall were restored to the defaults and my internet-access was working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.