Firewall misconfig causes LUA trouble Server 500

Sorry if this is no real Dev question but I think it is to deep into system for general conf questions.

I did a misconfiguration of the firewall which causes a LUA based error. Looks like there is something in the pipeline for changing systems config which is not ok. So the firewall config page shows instead of the rule a Server Error 500 (below the clean rules)

Because something has happened within the system (I cannot access the not shown zone in the network since the misconfiguration) I want to ssh into openwrt and edit the right files.

My Question: In which file on the system I have to undo the added wrong zone rule?

In my opinion Lua generates the running config of the system from a lua based config database-file.
So my idea is to read through it and find what causes the error. Following the output of the 500 Server Error only leads to template stuff. I am out of dev since some years, so maybe my opinion is wrong.

You need to look into /etc/config/firewall

1 Like

ok - thx - are the last entries in /etc/config/firewall also the last entries are done by the Lua script - or are the data changes managed region based?

It depends, newly added entities such as new port forwards or new traffic rules are added to the end but modified existing ones (such as zones) should stay in place.

If you pm me the firewall config I can take a look at what might be causing it. Note that the firewall configuration app has been converted from Lua to JavaScript quite a while ago so you must be running rather old, possibly EOLed unsupported code.

1 Like
uci show firewall

https://openwrt.org/docs/guide-user/base-system/uci#corrupted_configs