Allow httpd-admin (:980) access only from allowed IP's like Server Manager

Hi, what would be an easy way to restrict access to port 980 just for certain IP addresses just like the new Server Manager on nethserver 7.9 I tried to find a hints in the shorewall configs but could find any.

Any ideas?

Thanks
Stephan

You need a template custom for it.
First, restrict the access to green: config setprop httpd-admin access green.
Then create the template custom:

  1. mkdir -p /etc/e-smith/templates-custom/etc/shorewall/rules/
  2. echo 'ACCEPT net:1.2.3.4 $FW tcp 980' >> /etc/e-smith/templates-custom/etc/shorewall/rules/70httpd-admin
  3. signal-event firewall-adjust

Change `1.2.3.4` with your remote IP.
3 Likes

Thank you that solved it for me!

1 Like