Score:0

My Ubuntu Server Ports got locked

bg flag

I just tried to join to my Jenkins on my VPS as usual. When I try to access the URL it returns the error code ERR_CONNECTION_TIMED_OUT. This happens as well with port 8080 for my website and other ports. I can join to my SSH session.

The ports are allowed by the UFW.

Status: active

To                         Action      From
--                         ------      ----
5432                       ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
21                         ALLOW       Anywhere
9080                       ALLOW       Anywhere
27015/udp                  ALLOW       Anywhere
7777/udp                   ALLOW       Anywhere
7778/udp                   ALLOW       Anywhere
27020/tcp                  ALLOW       Anywhere
7778/tcp                   ALLOW       Anywhere
27050/udp                  ALLOW       Anywhere
27050/tcp                  ALLOW       Anywhere
27015/tcp                  ALLOW       Anywhere
27000/tcp                  ALLOW       Anywhere
27100/tcp                  ALLOW       Anywhere
27036/tcp                  ALLOW       Anywhere
27100/udp                  ALLOW       Anywhere
27031/udp                  ALLOW       Anywhere
4379/udp                   ALLOW       Anywhere
4380/udp                   ALLOW       Anywhere
27014/udp                  ALLOW       Anywhere
27030/udp                  ALLOW       Anywhere
27016                      ALLOW       Anywhere
27020                      ALLOW       Anywhere
22                         ALLOW       Anywhere
8080                       ALLOW       Anywhere
5432 (v6)                  ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
21 (v6)                    ALLOW       Anywhere (v6)
9080 (v6)                  ALLOW       Anywhere (v6)
27015/udp (v6)             ALLOW       Anywhere (v6)
7777/udp (v6)              ALLOW       Anywhere (v6)
7778/udp (v6)              ALLOW       Anywhere (v6)
27020/tcp (v6)             ALLOW       Anywhere (v6)
7778/tcp (v6)              ALLOW       Anywhere (v6)
27050/udp (v6)             ALLOW       Anywhere (v6)
27050/tcp (v6)             ALLOW       Anywhere (v6)
27015/tcp (v6)             ALLOW       Anywhere (v6)
27000/tcp (v6)             ALLOW       Anywhere (v6)
27100/tcp (v6)             ALLOW       Anywhere (v6)
27036/tcp (v6)             ALLOW       Anywhere (v6)
27100/udp (v6)             ALLOW       Anywhere (v6)
27031/udp (v6)             ALLOW       Anywhere (v6)
4379/udp (v6)              ALLOW       Anywhere (v6)
4380/udp (v6)              ALLOW       Anywhere (v6)
27014/udp (v6)             ALLOW       Anywhere (v6)
27030/udp (v6)             ALLOW       Anywhere (v6)
27016 (v6)                 ALLOW       Anywhere (v6)
27020 (v6)                 ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)
8080 (v6)                  ALLOW       Anywhere (v6)

Simon Sudler avatar
us flag
Check the Jenkins logfile. Delete or move the Jenkins logfile and restart Jenkins... until you see a helpful error message.
Score:3
bg flag

The problem was that I had a series of restrictions in iptables that prevented incoming connections except for SSH.

To disable these restrictions I ran the following commands:

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F

After that, I activated ufw and added the ports configured in my jenkins (9080).

sudo ufw allow ssh
sudo ufw enable
sudo ufw allow 9080

I found the answer on this post: How to start stop iptables on ubuntu

Artur Meinild avatar
vn flag
Great that it worked!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.