c1tr00z
By:
c1tr00z

nmap shows port 8080 closed on Ubuntu

July 12, 2015 11.5k views
Firewall

nmap shows port 8080 closed, but i dont have rules in iptables and allows all in ufw rules
This is my iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

And this ufw

ufw status
Status: active

To                         Action      From
--                         ------      ----
80                         ALLOW       Anywhere
8080                       ALLOW       Anywhere
80 (v6)                    ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)

From localhost nmap shows ports 8080 is opened

nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-12 08:12 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000018s latency).
Not shown: 998 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
8080/tcp open  http-proxy

But from my local machine this port is closed

nmap 188.166.120.61

Starting Nmap 6.49BETA3 ( https://nmap.org ) at 2015-07-12 15:12 Russia TZ 2 Sta
ndard Time
Nmap scan report for ctrz.me (188.166.120.61)
Host is up (0.036s latency).
Not shown: 997 closed ports
PORT     STATE    SERVICE
19/tcp   filtered chargen
22/tcp   open     ssh
1900/tcp filtered upnp

Nmap done: 1 IP address (1 host up) scanned in 2.57 seconds
nmap 188.166.120.61 -p 8080

Starting Nmap 6.49BETA3 ( https://nmap.org ) at 2015-07-12 15:13 Russia TZ 2 Sta
ndard Time
Nmap scan report for ctrz.me (188.166.120.61)
Host is up (0.035s latency).
PORT     STATE  SERVICE
8080/tcp closed http-proxy

Nmap done: 1 IP address (1 host up) scanned in 0.55 seconds

What am I doing wrong?

Thanks for your help

2 Answers

Is your proxy running and using the port? If not it wont show as open

sudo netstat -lnp | grep ':8080 '

I had the same issue. The issue was caused because my application was listening on 127.0.0.1:8080. After some research I found that my app should listen on 0.0.0.0:8080 instead. nmap from external now shows port 8080 as open

Have another answer? Share your knowledge.