1

Fresh install of Ubuntu Server LTS 10.04 on a Rackspace next gen (Performance) server needs the following ports open: 25/tcp, 80/tcp, 443/tcp, 3306/tcp.

I used nmap to check for open ports, here is what lists as open:

PORT   STATE SERVICE
22/tcp open  ssh

So I used ufw to open the ports (25/tcp, 80/tcp, 443/tcp, 3306/tcp)

$sudo ufw allow 25/tcp
Rule updated

Afterward, ufw lists the same port (22/tcp) as being open:

PORT   STATE SERVICE
22/tcp open  ssh

Am I missing something? Are the ports open, but just not showing as open? Is it because nmap is missing their status due to Ubuntu denying it the ability to see that they are open since nothing is listening?

1 Answer 1

2

A port is just a number that is part of an TCP address. If a program is waiting for incoming connections ("listening") on that port the port is called "open", otherwise it's "closed".

The kernel may filter traffic to a port to make it "closed" for some or all remote addresses. You can configure this filter e.g. by using ufw.

So ufw can't open a port, it can just tell the kernel to filter or not filter traffic for a given port.

You only told ufw not to filter the given ports (that is the default). You still need some programs to listen on that ports to make them "open".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .