Open port in CentOS

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
User avatar
rlm850
This is my homepage
This is my homepage
Posts: 141
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Dec 10, 2009 12:17 am
Location: Staten Island, NY
Contact:

Open port in CentOS

Post by rlm850 »

Things just aren't going my way today, and I am not a linux guy..

I have been trying to open port 27500 for the past 2 hours. (For HLStats:X CE) I'm using the single core unmanaged for this, since I have a windows managed, plus I will be running a few shoutcasts on here and basic html. But I've never had a problem with ports lately as much as I am right now..

Whatever I do, the port stays closed and http://www.yougetsignal.com/tools/open-ports/ confirms it's closed. There is also no hlxce response on the game server (no chat broadcasts, no rank/kpd/status feedback), but in the daemon, I get:

"Attempting to start HLstatsX:CE daemon on port 27500...
Daemon successfully started on port 27500"

I have never had a problem with this before.. then again I've never done it on Linux, always Windows.
Lend me a hand here :(
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Open port in CentOS

Post by soja »

iptables -F as root
Not a NFO employee
User avatar
rlm850
This is my homepage
This is my homepage
Posts: 141
Joined: Thu Dec 10, 2009 12:17 am
Location: Staten Island, NY
Contact:

Re: Open port in CentOS

Post by rlm850 »

Nothing happens.

[root@*** ~]# iptables -F
[root@*** ~]#
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Open port in CentOS

Post by soja »

That's normal. Is the port open now?
Not a NFO employee
User avatar
rlm850
This is my homepage
This is my homepage
Posts: 141
Joined: Thu Dec 10, 2009 12:17 am
Location: Staten Island, NY
Contact:

Re: Open port in CentOS

Post by rlm850 »

It did not open with that. However I did manage to add it with:

Code: Select all

[root@*** ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 27500 -j ACCEPT -m comment --comment "HLXCE"
I now see it

Code: Select all

[root@*** ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
INPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0
INPUT_ZONES_SOURCE  all  --  0.0.0.0/0            0.0.0.0/0
INPUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:27500 /* HLXCE */
I am checking with http://www.yougetsignal.com/tools/open-ports/
"Port 27500 is closed on 74.91.116.94." (VDS IP)

I still however receive:

Code: Select all

[root@*** scripts]# ./run_hlstats start

HLstatsX:CE daemon control
http://www.hlxce.com
---------------------------
Attempting to start HLstatsX:CE daemon on port 27500...
Daemon successfully started on port 27500
With no data on the gameserver.
Pulling my teeth on this one. I'm fairly good with install hlxce but not on linux, and since they moved from hlxce to alliedmods, all the server install tutorials are gone that would have probably solved my problems already.
User avatar
rlm850
This is my homepage
This is my homepage
Posts: 141
Joined: Thu Dec 10, 2009 12:17 am
Location: Staten Island, NY
Contact:

Re: Open port in CentOS

Post by rlm850 »

Guess I have no choice but to make a new reply on this one, looks like my editing time is up.

I get this from the daemon control on the stats web end.

Code: Select all

Sending Command to HLstatsX: CE Daemon at 74.91.116.94:27500 — 50 bytes OK
Waiting for Backend Answer...recieving 0 bytes in 0 packets...OK
No packets received — check if backend dead or not listening on 74.91.116.94:27500
Closing connection to backend...OK
This is seemingly all relevant to the port.. yes? Why can't I get the damn thing open!
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Open port in CentOS

Post by soja »

Follow this guide or google how to drop all iptables rules
http://www.cyberciti.biz/tips/linux-ipt ... rules.html
Not a NFO employee
User avatar
rlm850
This is my homepage
This is my homepage
Posts: 141
Joined: Thu Dec 10, 2009 12:17 am
Location: Staten Island, NY
Contact:

Re: Open port in CentOS

Post by rlm850 »

When I first posted this thread, I was dying inside waiting for a reply from you, because I knew you would, and knew you would have the answer.

I did what was stated in there - all is working now.
Thank you. So very much.

Lost about 12 players in the process of ranks not working but, port is open and working now. I'm happy enough with that!
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Open port in CentOS

Post by soja »

I'm happy to know you got it fixed and everything is working :)

If you need anything else, I'm always here :D

EDIT: Also, that rule you made might of worked, but you need to listen for UDP, not TCP :P
Not a NFO employee
Post Reply