Why 6001 ports that I opened with FirewallD and ufw refused?

SYSTEM INFORMATION
OS type and version Ubuntu 20.04 LTS
Webmin version 2.021
Virtualmin version 7.7-3

Hello.

After opening the port number 6001 on my Ubuntu System by doing ufw allow 6001 as you can see ufw status on this following screenshot:

Capture d'Ă©cran 2023-07-30 001019

And also, after trying to open that same port 6001 on Webmin => Networking => FirewallD as you can see here:

We notice after doing telnet ourdomain.name 6001 that this 6001 port is closed (refused):

That is the same observation when check it online (on: Open Port Check Tool : Network Tools : Tools : NetworkAppers), we can see that it is also blocked:

Please, how to fix that port opening error on my system?
Is there any way to accept connexion in our IP Server (or our domain name) through the new port 6001 opened?

Do UFW and firewalld work together? I thought it was one or the other not both.

Do you have a service on port 6001?

a command like lsof -i:6001 might see if something is listening on that port.

Thanks for your anwser but nothing is displayed after typing lsof -i:6001 and even after using its similar command netstat -ntlp | grep :6001 as you can see here:

lsof -i

Know that I first at all used UFW only to open that 6001 port since Yesterday. It is not opened at all.
It is only today that I try to open with FirewallD (in Virtualmin).

I just reset UFW with ufw reset and ufw is no longer considered.

So, what is wrong with this port 6001 despite its opening with ufw and FirewallD (Virtialmin) ???
Can anyone help me please ???

ufw and Firewalld are not mutually compatible. You need to use one or the other, and you need to know which one you’re using. Virtualmin configures Firewalld during installation, just so that we can have the same firewall GUI across all installations; it’s a reasonably good compromise solution to the problem of a “universal” Linux firewall (when there is no such thing, other than iptables or nftables directly).

If nothing is listening on port 6001, nothing about the firewall matters, regardless of whether the firewall is provided by Firewalld or ufw (but you still ought to figure out which firewall you have before trying to change it).

All right. Thanks. I will check it.

What I don’t understand is why. If there is nothing listening on a port why open it?
Is that not a big red flag waved at the world “Come and attack here”?

Oh, does the “u” of ufw really stand for “universal”? we have always referred to it by a different word :walking_man:t2:

Let me ‘uncomplicate’ that for you. :wink:

Ufw stands for Uncomplicated Firewall, and is program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.

launchpad.net/ufw

I don’t think @joe used it the way you took it.

1 Like

“Universal” “Uncomplicated” neither seem to match our dictionary - “Unnecessary” or more simply “Useless” might be a little bit closer. That aside I’m sure it has some use - it has caused me problems in the past where it has been suggested.
I approve of Firewalld - that seems perfectly adequate.

I still do not understand why the OP is opening 6001

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.