1

I am using CENTOS 7, and used to open some ports for a specific computer with no problems.

Recently, I tried to open several new ports (for specific ip), but I got failure when trying checking them via telnet command.

TelNet [IP] [PORT] (From Windows 10)

Returns failure message:

Connecting To [IP] ... Could not open connection to the host, on port [PORT]

The only change I see that, I got the same error as above (in less than second) when the port is opened, but when it is closed - I got the same error in more than 10 seconds.

The command I am running on CENTOS is:

firewall-cmd --zone=windowszone --add-port=8001/tcp --permanent
firewall-cmd --reload

When trying checking out via iptables command the state by:

iptables --list-rules

I got the followinig:

...
-A IN_windowszone -j IN_windowszone_log
-A IN_windowszone -j IN_windowszone_deny
-A IN_windowszone -j IN_windowszone_allow
-A IN_windowszone -p icmp -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 2181 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 3306 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 8005 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 9092 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 6379 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 9006 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 8001 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 81 -m conntrack --ctstate NEW -j ACCEPT
-A IN_windowszone_allow -p tcp -m tcp --dport 82 -m conntrack --ctstate NEW -j ACCEPT

Why even I did firewall-cmd --zone ... as described, still I cannot access the port by telnet from windows?

All of the ports above are from a specific computer (where linux is) of the same farm.

Are there any other firewall rules, which I shall check out?

Thanks.

closed as unclear what you're asking by Jeff Schaller, Stephen Rauch, G-Man, sebasth, Anthon Oct 7 '17 at 20:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You elided potentially useful messages , like timeout or no route to host or refused. Show all of the output. Also, are you running a telnet daemon? – Jeff Schaller Oct 7 '17 at 13:37
  • The telnet is openned on windows side. I didn't know that I need to run telnet daemon on linux (I see that I can do telnet to other ports, such as 22, but not for the new one). I got message: ERR_CONNECTION_REFUSED on browser. On telnet (windows) I got the full message: Connecting To localhost...Could not open connection to the host, on port xxx: Connect failed. – user3834980 Oct 7 '17 at 14:38
  • I don't know what the underlying problem is but you state that you tried to allow port 8000 but there is no 8000 in the iptables output. – Hauke Laging Oct 7 '17 at 15:37
  • @user3834980: Don't post comments like the above.  If you have additional details to clarify your question, click edit and add them to the question. – G-Man Oct 7 '17 at 16:18
  • The iptables seems fine. Port 3306 - was manually added i.e (mysql default port), and still - I succeed access that port by telnet. – user3834980 Oct 7 '17 at 19:02

Browse other questions tagged or ask your own question.