Koozali.org: home of the SME Server

Opening ports for a game server

Virtus

Opening ports for a game server
« on: July 22, 2006, 12:17:15 AM »
Im trying to setup a game server on my SME7.0 and I read a few post here on the forum, did some searching in the FAQ´s and thoug up of this solution..

The game server I want to run requires both udp and tcp ports 7777 and 7778 to be open, so I do the following.

[root@sandy gtasamp]# iptables -A INPUT -j ACCEPT -p tcp --destination-port 7777 -i eth1

[root@sandy gtasamp]# iptables -A INPUT -j ACCEPT -p tcp --destination-port 7778 -i eth1

[root@sandy gtasamp]# iptables -A INPUT -j ACCEPT -p udp --destination-port 7777 -i eth1

[root@sandy gtasamp]# iptables -A INPUT -j ACCEPT -p udp --destination-port 7778 -i eth1

Then I check to see what ports my server is listning on, and 7777 7778 does not show, what am I doing wrong?

[root@sandy gtasamp]# netstat -ant | grep LISTEN
tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:515                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:995                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:548                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:389                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:465                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:980               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN
tcp        0      0 10.0.0.10:53                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.2:53                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3128                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:26                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:4700              0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN

Offline ldkeen

  • *
  • 403
  • +0/-0
Opening ports for a game server
« Reply #1 on: July 22, 2006, 05:31:28 AM »
I think the proper way to do it is:
Code: [Select]
#db config set somegame service UDPPort 7777,7778 TCPPort 7777,7778 access public status enabled
Obviously replace "somegame" with the name of your game server. I'm also not too sure of the syntax to be used with multiple ports. Give it a try and see what happens. If you want to disable the gameserver you can just do:
Code: [Select]
#db config set somegame status disabled
To activate any changes make sure you do the following:
Code: [Select]
#signal-event remoteaccess-update
You can check if the firewall was modified by doing the following:
Code: [Select]
#iptables-save | grep 7777
Regards Lloyd