Hi,
I’ve just freshly installed LEAP 15.1 on our business server. First port of call is to set up Webmin which I’ve done. I wasn’t sure how to add webmin port 10000 to the firewall using yast2 as it only allows pre-configured services to be added to zones. So I used:
firewall-cmd --zone=public --add-port=10000/tcp --permanent
.
This has worked, but how do I add port numbers or custom services using Yast to the firewall? Or is their a Webmin service listed, but I’m somehow missing it?
The YaST Firewall utility has limited capability currently, so adding a port explicitly as you’ve done is the correct approach. Also mentioned here…
https://doxfer.webmin.com/Webmin/FirewallD
However, you can define a custom service of course…
https://firewalld.org/documentation/howto/add-a-service.html
Or you could create /etc/firewalld/services/webmin.xml directly with the following contents…
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>webmin</short>
<description>Web interface for Linux system administration</description>
<port protocol="tcp" port="10000" />
</service>
then do
firewall-cmd --permanent --zone=public --add-service=webmin
firewall-cmd --reload
Now the service should be accessible
firewall-cmd --zone=public --list-all
I use the text (ncurses) version of YaST2, but I am sure this is also available in the graphic versions.
yast2
Security and Users > Firewall
Zones > e.g. public
choose ether <Services> to ass or remove named services
or <Ports> to edit TCP, UDP, SCTP or DCCP ports by number.
The latter allows you to add TCP port 1000 to the public zone.