1

So I just served up some directory using python SimpleHTTPServer and I'm unable to access port from another machine on the same network. It works fine locally, with localhost:port as well as ip:port but not from another machine. Below are the results for nmap and firewall is inactive.

nmap <ip> -p 8080
Starting Nmap 7.70 ( https://nmap.org ) at 2019-05-16 14:10 IST
Nmap scan report for css-Latitude-E6430 (<ip>)
Host is up (0.00014s latency).

PORT     STATE SERVICE
8080/tcp open  http-proxy

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


sudo ufw status
Status: inactive

nmap from another computer on the same network

nmap -p 8080 <ip>
Starting Nmap 7.70 ( https://nmap.org ) at 2019-05-16 14:07 IST
Nmap scan report for <ip>
Host is up (0.073s latency).

PORT     STATE  SERVICE
8080/tcp closed http-proxy

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

Yes, it does say closed from another. Checked if the machine is just listening for local requests but nope,

netstat -an | grep :8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*

It's listening on 0.0.0.0

So what could be wrong up here? If more data is needed kindly let me know.

  • Which version of Ubuntu are you running? Are you using firewalld by any chance? If yes try firewall-cmd --list-all to see your current firewall rules – fmo May 16 at 9:17
  • 18.04 is the version and firewall-cmd --list-all yeilds, public (active) target: default icmp-block-inversion: no interfaces: wlo1 sources: services: ssh dhcpv6-client ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: Ok this is active, something needs to be changed? – Nobody May 16 at 11:13
  • Probably something like this sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent then sudo firewall-cmd --reload – fmo May 16 at 11:19
  • Yes, that worked. Didn't know that something besides ufw existed. Thanks for the info. – Nobody May 18 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.