I'm trying to make sure that the machine is accepting tcp connections on port 8245, however I am unable to connect.

When I try from an external machine: telnet myhostname.com 8245

I get:

Unable to connect to remote host: Connection refused

I have already added the port on the host machine via firewall-cmd:

sudo firewall-cmd --zone=public --add-port=8245/tcp --permanent
sudo firewall-cmd --reload

And confirmed with:

sudo firewall-cmd --list-ports

8245/tcp 80/tcp 443/tcp

And: sudo iptables -L

Chain IN_public_allow (1 references)

target prot opt source destination

ACCEPT tcp -- anywhere anywhere tcp dpt:8245 ctstate NEW,UNTRACKED

I'm having no issues making telnet connections to ports 80 and 443, so I'm not sure what I'm doing wrong.

1 Answer 1


Your service that is listening on port 8245 is probably not listening on all addresses, maybe only localhost. You can confirm by running netstat -l on the Centos server and checking for the local address with port 8245 and state LISTEN.

  • The reason I want this port opened is because I'm having an issue with my noip dynamic update client service that is running. I read that the client uses 80, 443 and 8245. When I look at netstat there is nothing listening on all three of those ports. I thought using telnet is just supposed to tell you if a port is open and doesn't necessarily indicate that a service is actively listening on that port? Oct 6 at 0:18
  • telnet will try to connect to whatever is running on the port, if nothing is actually listening on that port then you will get the connection refused message even if the firewall is allowing the incoming connection. As for your dynamic DNS client, that would use an outgoing connection so it doesn't matter what incoming ports are allowed. Check your iptables -L OUTPUT chain to see what the default policy is, and if only certain ports are allowed.
    – Adam
    Oct 6 at 0:23
  • Thank you, I'm still learning. Here is what my output chain is: ACCEPT all -- anywhere anywhere OUTPUT_direct all -- anywhere anywhere Does this mean that all outbound traffic is being allowed? Oct 6 at 0:41
  • I'm also confused because netstat doesn't show anything listening on port 80, but I'm still able to telnet to it. Oct 6 at 1:20
  • I read that the client uses 80, 443 and 8245 Chances are that the client uses these ports on outbound connections. If that is the case it won't listen on that ports. There is no need for a dyndns client to listen on a port. Oct 6 at 8:08

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.