I have added two rules in firewalld, using the following commands:

firewall-cmd --zone=public --add-port=22005/tcp --permanent

firewall-cmd --zone=public --add-port=22003/udp --permanent

After reloading firewalld, I took a look at iptables, with iptables -L

ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:optohost005 ctstate NEW
ACCEPT     udp  --  anywhere             anywhere             udp dpt:optohost003 ctstate NEW

What is optohost, and why does it replace 22? I can't find much about this anywhere on Google. It only seems to happen for these two IPs (22005/22003)

I am running CentOS Linux release 7.3.1611, 3.10.0-514.26.2.el7.x86_64



After some more searching, I found this:


optohost003     22003/tcp               # Opto Host Port 3
optohost003     22003/udp               # Opto Host Port 3
optohost005     22005/tcp               # Opto Host Port 5
optohost005     22005/udp               # Opto Host Port 5

This is documentation for "docker", more specifically the contents of /etc/services which I checked manually on my machine and the lines exist. I'm not exactly sure what "docker" does but I know it's something to do with my network.. If I check ifconfig, sure enough it's there:

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    ether 02:42:d2:8b:6d:b6  txqueuelen 0  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

What I gather from this is that docker has some services running on those ports (22005/22003) and it's taking over (?)

I need these ports for a game server that I run. Any idea on how to stop it from "taking over" those ports?

Update #2: Removing those lines from /etc/services makes optohost disappear when looking up the ports with iptables -L, and the ports are displayed correctly. However I am not entirely sure what effect removing those lines has, and if it has any actual effect at all apart from simply being a label or name.

  • Since your actual question has changed, consider updating the title to better reflect the question. – Jeff Schaller Aug 18 '17 at 0:16

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.