Hi all,
I was away for a while experimenting with different platforms, just for learning and experiencing the differences. I have experimented with NS6, ClearOs and Zentyal so far and when NS8 came out, it was time to come back.
What an amazing improvements NS has made! it’s really running far ahead since my initial experiments. So now i have headed over to implementing production for my personal projects.
I’m pretty sure i’ll never look back.
I have a home connection with a fixed IP and all ports open. I run a hardware firewall at home here giving me the first safety border against dirt on the outside.
Currently i run a small cluster with a master node on my home server, and a VPS as a second node for my mail system.
The VPS has no firewall settings, so it’s full open to the outside, which is a security concern of course.
But: any standard installation of NS8 had firewalld running, with a trusted zone on the wireguard VPN. Trusted zone has a standard ACCEPT.
It also has a ‘public’ zone, with standard DROP and a set of services that are allowed. These services are automatically added when functionality or apps are added to the node.
A clean install of NS8 open ports in the firewall for services ‘dhcpv6-client’, ‘ssh’, ‘http’ and ‘https’
Ssh is a security concern, you don’t want port 22 to open to the entire internet.
Https and https are also open, so cluster-admin is also reacheable from the outside - which is not needed afaik for my specific setup, apart from the main node.
the ports for the MAIL app, yeah, they are needed of course.
Since i have a fixed IP, i reconfigured firewalld to only allow ssh, http and https from my home ip, and drop everything else. i want to share how i did it for other new users facing the same challenges.
SSH into the vps and run following commands:
firewall-cmd --zone=public --remove-service=ssh --permanent
firewall-cmd --zone=public --remove-service=http --permanent
firewall-cmd --zone=public --remove-service=https --permanent
firewall-cmd --zone=public --remove-service=dhcpv6-client --permanent
firewall-cmd --zone=public --add-rich-rule 'rule family="ipv4" service name="ssh" source address="YOUR.IP.GOES.HERE" accept' --permanent
firewall-cmd --zone=public --add-rich-rule 'rule family="ipv4" service name="http" source address="YOUR.IP.GOES.HERE" accept' --permanent
firewall-cmd --zone=public --add-rich-rule 'rule family="ipv4" service name="https" source address="YOUR.IP.GOES.HERE" accept' --permanent
firewall-cmd --reload
dhcpv6-client can only be removed if your VPS has a fixed IPv6 address, which it probably has.
To check the status:
firewall-cmd --list-all --zone=public
There sure are other anb better ways to achieve this (like renting a VPS with a REAL firewall), but this what works for me.
Now, i can SSH into the machine while i’m at home or when i have a VPN connected to my home from remote locations.
Grtz,
Stef