0

OS: CentOS 7

This is a question that is bordering on two issues. I have a docker machine running where I recently installed the PLEX container from linuxserver/plex. The current problem is that I cannot access the site to configure PLEX https://localhost:32400/web. In my attempts to determine why this is occurring, I noticed that port 32400 appeared to be closed even though it should've been opened when the container was created, I am using the host network.

I attempted to see if I could access the site using curl

curl -i http://localhost:32400 
curl -i http://10.0.1.200:32400

I then verified open ports with NMAP

#nmap 10.0.1.200

Starting Nmap 6.40 ( http://nmap.org ) at 2019-01-18 12:52 CST
Nmap scan report for 10.0.1.200
Host is up (0.00049s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
22/tcp open  ssh

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

So clearly port 32400 is not open, so I went to firewall-cmd

#sudo firewall-cmd --get-active-zones
public
  interfaces: eno1

#sudo firewall-cmd --zone=public --add-port=32400/tcp --permanent
success
#sudo firewall-cmd --reload
success

I also checked to see if it was open

#sudo firewall-cmd --zone=public --list-ports
32400/tcp

However, NMAP still shows its closed. Any idea why firewalld would show an open port on the docker host machine but it is actually closed? I'm not even sure this will get the site working for Plex.


Verification of what Kramer had suggested that it was possible my interface was not setup

# ip addr
3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 10.0.1.200/24 brd 10.0.1.255 scope global noprefixroute dynamic eno1


#firewall-cmd --zone=public --list-interfaces
eno1
  • I take it you are using --net=host in your docker command as recommended – sourcejedi Jan 18 at 20:29
  • @sourcejedi Yes, that's correct but it doesn't seem to open any of the needed ports – JMeterX Jan 18 at 20:36
  • 1
    A bit on the obvious side, but does netstat or ss report port 32400 as listening? – Haxiel Jan 19 at 6:26
0

make sure the network interface is succesfully added to zone "public", normally only the default net card is (i.e. eth0). To add an interface with a zone:

#firewall-cmd --permanent --zone=public --add-interface=<interface_name>

To know what interfaces you have try:

#ipaddr

OR

#ifconfig

add the interface provinding the IP 10.0.1.200

In the future, when posting the command you run, please also post the output of the command, that helps to understand and debug the problem.

HTH :)

  • Updated post to reflect your recommendation, I did verify that the interface was correct but I've listed it out above as well – JMeterX Jan 18 at 21:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.