UFW -- How To Open Port 8080
9,875
You did open your firewall correctly. In order to "open" the port, you need to actually have a service running that listens on port 8080.
Author by
Matthew Hoggan
I like to model data visually using computers.
Updated on September 18, 2022Comments
-
Matthew Hoggan over 1 year
I thought I had allowed connections to http-alt (8080) using ufw. My reasoning for thinking this is because:
gerrit2@localhost:~$ sudo ufw status Status: active To Action From -- ------ ---- 22 ALLOW Anywhere 80/tcp ALLOW Anywhere 8080/tcp ALLOW Anywhere 22 (v6) ALLOW Anywhere (v6) 80/tcp (v6) ALLOW Anywhere (v6) 8080/tcp (v6) ALLOW Anywhere (v6)
and
Chain INPUT (policy DROP) target prot opt source destination ufw-before-logging-input all -- anywhere anywhere ufw-before-input all -- anywhere anywhere ufw-after-input all -- anywhere anywhere ufw-after-logging-input all -- anywhere anywhere ufw-reject-input all -- anywhere anywhere ufw-track-input all -- anywhere anywhere ... Chain ufw-before-input (1 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ufw-logging-deny all -- anywhere anywhere ctstate INVALID DROP all -- anywhere anywhere ctstate INVALID ACCEPT icmp -- anywhere anywhere icmp destination-unreachable ACCEPT icmp -- anywhere anywhere icmp source-quench ACCEPT icmp -- anywhere anywhere icmp time-exceeded ACCEPT icmp -- anywhere anywhere icmp parameter-problem ACCEPT icmp -- anywhere anywhere icmp echo-request ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc ufw-not-local all -- anywhere anywhere ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns ACCEPT udp -- anywhere 239.255.255.250 udp dpt:1900 ufw-user-input all -- anywhere anywhere ... Chain ufw-user-input (1 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT udp -- anywhere anywhere udp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:http-alt
However, when I go to see if that port is open with nmap I get the following:
[mehoggan@localhost ~]$ nmap -p 8080 matthewh.me Starting Nmap 6.45 ( http://nmap.org ) at 2014-07-07 20:00 PDT Nmap scan report for matthewh.me (50.116.18.212) Host is up (0.050s latency). rDNS record for 50.116.18.212: li418-212.members.linode.com PORT STATE SERVICE 8080/tcp closed http-proxy
What do I need to do to open that port up to the outside world using Ubuntu's 14.04 ufw?
-
Matthew Hoggan almost 10 yearsI am trying to start gerrit code review to listen on that port, but it keeps failing. So I thought I had to open the port first for the service to listen on.
-
Michael Hampton almost 10 yearsCongratulations, you've stumbled into the XY problem.