Centos 7 ports problem

Issues related to configuring your network
Post Reply
ClaudiuCitar
Posts: 4
Joined: 2020/03/22 17:51:39

Centos 7 ports problem

Post by ClaudiuCitar » 2020/03/22 17:53:03

I have a WebHost from another host company, I made mysql remote and all that I need, I added in database.cfg but the cs: go server rejects connections to port 27015, even if the firewall is off and the server goes.
I would like to mention that the port 80 connections go, only 27015 do not go.

telnet: connect to address ipadresshide: Connection refused
How can I fix it so that the respective open port works? Firewall is off, remember!
And on the web he writes that he cannot connect to the server because of this as telnet rejects.

ONLY TCP PROBLEM PORT! UDP WORKING!

User avatar
TrevorH
Forum Moderator
Posts: 29911
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 ports problem

Post by TrevorH » 2020/03/22 19:13:20

Post the output from the iptables-save command, run as root.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3176
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Centos 7 ports problem

Post by jlehtone » 2020/03/22 19:13:51

Not enough information, but couple reasons come to mind:
* The service does not listen/accept external connections
* The hosting platform has a firewall

ClaudiuCitar
Posts: 4
Joined: 2020/03/22 17:51:39

Re: Centos 7 ports problem

Post by ClaudiuCitar » 2020/03/23 14:21:41

I also tried from another host + local to telnet to see if the port is going, not going.
And at the external I also tried from Germany a call 27015, from where I have the host and does not accept.


And iptables-save : -bash: iptables-save: command not found

User avatar
jlehtone
Posts: 3176
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Centos 7 ports problem

Post by jlehtone » 2020/03/23 23:49:02

How about these:

Code: Select all

sudo iptables -S
sudo ss -tulpn

ClaudiuCitar
Posts: 4
Joined: 2020/03/22 17:51:39

Re: Centos 7 ports problem

Post by ClaudiuCitar » 2020/03/26 15:54:36

I reinstalled iptables, and now working.
[root@server1 csgo]# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -p tcp -m tcp --dport 27015 -j ACCEPT
-A INPUT -p udp -m udp --dport 27015 -j ACCEPT
[root@server1 csgo]#



[root@server1 csgo]# ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 *:68 *:* users:(("dhclient",pid=1508,fd=6))
udp UNCONN 0 0 *:68 *:* users:(("dhclient",pid=1029,fd=6))
udp UNCONN 0 0 127.0.0.1:323 *:* users:(("chronyd",pid=791,fd=5))
udp UNCONN 0 0 *:27005 *:* users:(("srcds_linux",pid=9926,fd=23))
udp UNCONN 0 0 *:27015 *:* users:(("srcds_linux",pid=9926,fd=22))
udp UNCONN 0 0 *:27020 *:* users:(("srcds_linux",pid=9926,fd=24))
udp UNCONN 0 0 [::1]:323 [::]:* users:(("chronyd",pid=791,fd=6))
tcp LISTEN 0 128 *:22 *:* users:(("sshd",pid=1430,fd=3))
tcp LISTEN 0 128 [::]:80 [::]:* users:(("httpd",pid=9872,fd=4),("httpd",pid=9871,fd=4),("httpd",pid=9870,fd=4),("httpd",pid=9869,fd=4),("httpd",pid=9868,fd=4),("httpd",pid=9867,fd=4),("httpd",pid=9864,fd=4),("httpd",pid=9863,fd=4),("httpd",pid=9862,fd=4),("httpd",pid=9861,fd=4),("httpd",pid=9860,fd=4))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=1430,fd=4))

User avatar
jlehtone
Posts: 3176
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Centos 7 ports problem

Post by jlehtone » 2020/03/26 17:15:36

You have no firewall in practice, because you accept everything from everywhere.
The only thing that you get from those two rules that you have is statistics on how much traffic comes to those two ports.

Process "srcds_linux" listens three ports: 27005/udp, 27015/udp, and 27020/udp. No tcp.

What is the status of your services?

Code: Select all

systemctl status firewalld
systemctl status iptables

ClaudiuCitar
Posts: 4
Joined: 2020/03/22 17:51:39

Re: Centos 7 ports problem

Post by ClaudiuCitar » 2020/03/27 17:17:57

[root@server1 csgo]# systemctl status firewalld
Unit firewalld.service could not be found.
[root@server1 csgo]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
Active: active (exited) since Thu 2020-03-26 16:55:56 CET; 1 day 1h ago
Process: 10273 ExecStop=/usr/libexec/iptables/iptables.init stop (code=exited, status=0/SUCCESS)
Process: 10290 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 10290 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/iptables.service

Mar 26 16:55:56 private systemd[1]: Starting IPv4 firewall wi...
Mar 26 16:55:56 private iptables.init[10290]: iptables: Apply...
Mar 26 16:55:56 private systemd[1]: Started IPv4 firewall wit...
Hint: Some lines were ellipsized, use -l to show in full.


I need TCP for connect to my WebHost...
I tested another CS server: GO, not mine! And port 27015 went to many, on the TCP version, only TCP does not go to me.

User avatar
jlehtone
Posts: 3176
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Centos 7 ports problem

Post by jlehtone » 2020/03/27 18:42:03

Your webhost is on tcp port 80. That is different from tcp port 27015.

You have no firewall. You allow access to all ports, tcp, udp, and whatnot. You do have iptables.service to load firewall rules to kernel during boot, but you have no useful rules to load. As good as not loading any. All open.


No process of yours listens on tcp port 27015. Your "CS GO" server does not listen on 27015/tcp. You get no response from 27015/tcp because nobody is there to respond. If your server process should listen on 27015/tcp, then you have a misconfiguration of the server process.

Post Reply

Return to “CentOS 7 - Networking Support”