Cannot open ports with UFW

Linode Staff

Hi,

I cannot open port 80 or any other port with ufw… I cannot see in the logs if the connections are rejected or not.
I read your article and performed the recommended steps but nothing happens… This is the output of 'ufw status':

To Action From
-- ------ ----
80/tcp ALLOW IN Anywhere
22 ALLOW IN Anywhere
80 ALLOW IN Anywhere
80/tcp (v6) ALLOW IN Anywhere (v6)
22 (v6) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)

Pls help me figure out how to open these ports in my firewall, thanks!

3 Replies

Hello,

I see that you're having trouble opening firewall ports with UFW. Based on the output you sent int, those rules look right to me, so I wonder if either the service you need isn't running or if maybe there is some default rule in your 'iptables' configuration that is blocking these ports (like a default policy for incoming packets). I would recommend running:

sudo netstat -plunt
sudo iptables-save

and attaching the output here so that we can take a look.

Regards,
Tom D.
Linode Support Team

Hi Tommy,

This is solved my issues, so many thanks to you :)

Hi, Im having the same issue, trying to open port 80 yet it's not working.

80 ALLOW Anywhere
80/udp ALLOW Anywhere
80 (v6) ALLOW Anywhere (v6)
80/udp (v6) ALLOW Anywhere (v6)

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 17694/systemd-resol
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 657/sshd: /usr/sbin

                      -

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct