Ubuntu Server unreachable from Public IP

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
I have a Ubuntu Server running a couple of docker images and using organizr as an frontend which is on port 80. I have already forwarded the port 80 and 7878 to my servers ip address on my router, but no luck accessing the port also using canyouseeme.org to verify. There's a chance that my ISP blocks port 80, but I've verified that 7878 becomes open when forwarded to a different computer on the network, but Ubuntu Server does not allow the connection. It should be noted that I'm a complete newbie to Linux and through my research I've concluded that I probably need to change something in iptables which I have no experience with. Disabling UFW or allowing the ports through UFW also does nothing. Installed webmin and tried a few things, but honestly didn't know what I was doing when presented with all the options in the firewall section. Is there anyone who can assist me to get my Ubuntu server to be accessed from the internet via port 80 or atleast any other port like 7878? I have checked on Portainer that Organizr port inside and outside the container is 80:80 same with Sonarr which is 7878:7878 so it should be visible outside the container on that port if I understand correctly.
 

Peon

Expert Member
Joined
Sep 28, 2006
Messages
2,794
Dumb question.

Have you set the router ip as your default gateway on ubuntu box?
 

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
Dumb question.

Have you set the router ip as your default gateway on ubuntu box?
I did mention I was a Linux newbie right? And yes to setting the default gateway does not make a difference and that makes it a stupid answer right?
 

Peon

Expert Member
Joined
Sep 28, 2006
Messages
2,794
I did mention I was a Linux newbie right? And yes to setting the default gateway does not make a difference and that makes it a stupid answer right?
No.

And you can ping 9.9.9.9 from ubuntu box correct?
 

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
Yes I can successfully ping 9.9.9.9 . Also tried now adding the rules to iptables and rebooting frequently to be sure, but no luck. Also disabled UFW just to get it out the way.

Here's my router port forwarding rules:
772808
 
Last edited:

Peon

Expert Member
Joined
Sep 28, 2006
Messages
2,794
And you can access those services on the ubuntu box locally?
 

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
Yes all docker services on the Ubuntu server is accessible from the local network.

Also hosted a service on main computer and portforwarded to it to ensure it's not a router/afrihost issue and was able to access that service outside the network.
 

Peon

Expert Member
Joined
Sep 28, 2006
Messages
2,794
Could it not be a conf issue in the programs in the docker not allowing remote networks?
 

Daruk

Honorary Master
Joined
Jul 18, 2008
Messages
42,236
I have a Ubuntu Server running a couple of docker images and using organizr as an frontend which is on port 80. I have already forwarded the port 80 and 7878 to my servers ip address on my router, but no luck accessing the port also using canyouseeme.org to verify. There's a chance that my ISP blocks port 80, but I've verified that 7878 becomes open when forwarded to a different computer on the network, but Ubuntu Server does not allow the connection. It should be noted that I'm a complete newbie to Linux and through my research I've concluded that I probably need to change something in iptables which I have no experience with. Disabling UFW or allowing the ports through UFW also does nothing. Installed webmin and tried a few things, but honestly didn't know what I was doing when presented with all the options in the firewall section. Is there anyone who can assist me to get my Ubuntu server to be accessed from the internet via port 80 or atleast any other port like 7878? I have checked on Portainer that Organizr port inside and outside the container is 80:80 same with Sonarr which is 7878:7878 so it should be visible outside the container on that port if I understand correctly.
UFW...
Run this:
sudo ufw status verbose
Post the output
 

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
UFW...
Run this:
sudo ufw status verbose
Post the output
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip

To Action From
-- ------ ----
137,138/udp (Samba) ALLOW IN Anywhere
139,445/tcp (Samba) ALLOW IN Anywhere
7878 ALLOW IN Anywhere
80 ALLOW IN Anywhere
22 ALLOW IN Anywhere
137,138/udp (Samba (v6)) ALLOW IN Anywhere (v6)
139,445/tcp (Samba (v6)) ALLOW IN Anywhere (v6)
7878 (v6) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
22 (v6) ALLOW IN Anywhere (v6)


Here is the pastebin link for the iptables -L command https://pastebin.com/yfuB4cHQ
 
Last edited:

Daruk

Honorary Master
Joined
Jul 18, 2008
Messages
42,236
Also do us an 'ip address' and post here, and double check which interface(s) organizr is listening on?
Do you get any output if you
curl lan_ip_address
From a shell prompt on the machine? What about curl 127.0.0.1 on the machine?
Are you able to access everything OK from another LAN connected PC on the same segment / IP range?
 
Last edited:

Arnoldsly99

Active Member
Joined
Jan 30, 2011
Messages
34
Do a TCPdump on port 7878 and see if you get any traffic.
Started the TCPdump on the interface with the ip address i use to access the server and connected
via mobile data to the server nothing loaded on the browser, but I can see that the tcpdump
is showing signs that I'm atleast reaching the server.



Here is my ifconfig:

TCPDump:

Also do us an 'ip address' and post here, and double check which interface(s) organizr is listening on?
Do you get any output if you
curl lan_ip_address
From a shell prompt on the machine? What about curl 127.0.0.1 on the machine?
Are you able to access everything OK from another LAN connected PC on the same segment / IP range?
Curl to ip address and localhost ip produced an output. Yeah I can access all services perfectly on the local
network from any device using - 192.168.0.172:7878 in browser for example

IP Address:


EDIT:
773052

The 7878 service has an IP of 172.18.0.2 so I also did an TCPdump on this interface and no output when trying to
access from mobile phone, but does produce logs when accessing via another computer.


UPDATE: Seemed to have found the problem, disabled the Transmission/OpenVPN(ExpressVPN) (https://github.com/haugene/docker-transmission-openvpn) container and was immediately able to connect from mobile. Still don't understand why and need to figure out how to have that container still run and access from internet. Was also under the impression only that container would be router through VPN, but the external IP inside container and outside changes to real external IP.
 
Last edited:
Top