Question

ALl ports except port 22 are closed but firewalls aren't on need help

So nothing is working. All ports are closed (being filtered) so they aren’t working) why is this?

Here is my nmap scan results

nmap -sV 157.245.5.153
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-23 07:56 Eastern Daylight Time
Nmap scan report for 157.245.5.153
Host is up (0.0096s latency).
Not shown: 988 filtered tcp ports (no-response), 11 filtered tcp ports (host-prohibited)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 8.59 seconds;

I’ve checked ufw status and it says disabled. and iptables status it says dead (disabled) why is this?

service iptables status
iptables.service - netfilter persistent configuration
     Loaded: loaded (/lib/systemd/system/iptables.service; enabled; vendor pres>
     Active: inactive (dead)
       Docs: man:netfilter-persistent(8)

ufw status shows ufw dead (can’t copy and paste it in)

netstat -tulpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
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      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 :::25                   :::*                    LISTEN      -
tcp6       0      0 :::4000                 :::*                    LISTEN      -
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 28, 2022

Hello,

Is it possible that you have another firewall like ufw installed? If so can you run the following command to check the currently allowed ports:

ufw status

If you try to connect to a specific port directly, does it work? For example, currently you only have port 22 and port 4000 open for the world, the rest of the services are binding on 127.0.0.1 which means they can not be accessed directly. You can test port 4000 using telnet for example:

telnet your_ip 4000

Best,

Bobby