I can't access the web interface

Hi @SimPos

Sounds like you didn’t use the full path to binaries in your script…

→ On the local console, your user / root benefits from having the correct environment set, including paths. Scripts run eg by cron, do NOT have any environment set, therefore full paths are needed!

Example:

A simple shutdown script wih poweroff won’t work
The same script with /usr/sbin/poweroff will work!

→ Always use full paths in your scripts, then they will work anywhere, in all environments…
(Permissions are a different issue!)

:slight_smile:

My 2 cents
Andy

I put the script in /etc/systemd/system, at least the status indicates it works, but what would be the full path to “shorewall clear?”

which shorewall

is your friend…

:slight_smile:

I’m (maybe wrongly) assuming your server does not have fail2ban or IPS modules installed, which could block connections.

At the moment your connection from the other computer is dropped/rejected, the last lines of /var/log/firewall.log might show you a hint of the cause. A more verbose version can be obtained with shorewall dump, as it will dump a large list with the firewall configuration being applied. shorewall show can display useful info too.

I’m confused because I don’t know when it’s a command argument or conversation, but to be more practical, my .sh contains “shorewall clear”, but it’s complicated

I did these commands without shorewall clear, so I don’t know if the result is different with shorewall clear

I don’t understand how everything before the power outage worked with a firewall and without this shorewall

I’m taking another route, running through crontab, but I think I’m making a mistake, if you can help

As I said, I set up the script.sh with shorewall clear, it works if I run it directly, after running it I can see the log, and I see the Nethserver with firewall notified

I inserted the script.sh in contrab -e:
@reboot /root/script.sh

It didn’t work, I thought it would run as soon as I restarted, I tried with * * * * * but it didn’t work either, the friend said he needed the entire path, but I don’t know how to do it and how to create the correct parameter

sme kernel: Shorewall:INPUT:REJECT:IN=ens2 OUT=…

(FAQ 17) Why are these packets being Dropped/Rejected? How do I decode Shorewall log messages?
(…)
INPUT or FORWARD

The packet has a source IP address that isn’t in any of your defined zones (“shorewall[-lite] show zones” and look at the printed zone definitions) (…)

some of the photos (with incomplete information) show rules for a wireless interface but no mention of ens2.