- Joined
- Jun 29, 2008
- Messages
- 5,028
- Reaction score
- 999
A lot of people ask so here is something for the curious.
What are the different networks?
LAN - Local Area Network (your home, office or university network)
WAN - Wide Area Network (the internet)
What am i connected to?
In Windows click Start->Run, type "cmd" and press Enter to get a command prompt. Type "ipconfig" and press Enter. Find your "Local Area Connection" and check it's IP Address. If it starts with 192.xxx.xxx.xxx or 10.xxx.xxx.xxx then you are connected to a LAN and will have a router.
Now go to
If your ipconfig address matches the
You find your Centos IP with the "ifconfig" command in a Centos terminal or putty.
Which address do i use for the server then?
If you want external people to be able to connect the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your WAN IP. If using an install script to install the server files when asked what the server's IP address should be enter the WAN one. Your /etc/odbc.ini should have the MSSQL database server IP (the LAN if you have one, WAN if you don't) and all other IP addresses should be 127.0.0.1. The client internal.txt should have the WAN IP.
If you want LAN only players then the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your LAN IP. If using an install script to install the server files when asked what the server's IP address should be enter the LAN one. Your /etc/odbc.ini should have the MSSQL database server LAN IP and all other IP addresses should be 127.0.0.1. The client internal.txt should have the LAN IP.
If using Hamachi (or similar) the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your Centos Hamachi IP. If using an install script to install the server files when asked what the server's IP address should be enter the Centos Hamachi one. Your /etc/odbc.ini should have the MSSQL database server IP (the LAN if you have one, WAN if you don't, or the Windows machine Hamachi if using that) and all other IP addresses should be 127.0.0.1. The client internal.txt should have the Centos Hamachi IP.
The server cannot "listen" for players on both the LAN and WAN at the same time so you must pick one mode of operation. Do not use a LAN address in the IPAddress= and AddrForClient= and expect WAN players to be able to connect as the server will be "listening" on the wrong network and only LAN players will be able to connect.
Why can routers be bad?
Your router is connected to the WAN, not your computer. The router creates a small LAN for your computers to connect to and the router sits between your computer and the internet getting you the web pages/files you ask for and blocking incoming connections your computer has not asked for. The router is like a hardware firewall that filters your connection and only allows incoming connections that you have asked for.
When a connection comes in from one of your players the router will not know what the connection is for and will block it because none of your LAN computers asked for the connection. This is why you need for forward ports. When forwarding the ports you are telling your router that any incoming connections on those ports are actually expected and you are telling the router which computer on your LAN it should forward the connections to.
At a basic level this is what a router is designed to do and many home routers do not supply any more functionality than this which can be a problem for Cabal. Why?
Imagine you have set up the server correctly using the WAN IP address and also correctly forwarded your ports. Your friends are already connected and playing so you try connecting and fail!
What is happening is your router is accepting the outside connections and forwarding them to the server as expected. It sees your connection to it (it has the WAN IP remember) from inside the LAN and sees it has a forwarding rule for the port you are using, then drops the connection anyway. It is only programmed to forward connections from outside and your connection from inside doesn't qualify for forwarding because like the cabal server the router can only look at one network for forwarding. It will guide connections from outside only because, technically, you should be using an internal IP address for internal connections anyway (which we can't do with Cabal).
Not all routers suffer this problem as some have a feature called "loopback" which is an extra feature designed specifically to handle the problem and loop any connections out to the WAN and then back into a LAN address via forwarding directly back to the internal IP address.
How do i know if my router has this problem?
You normally can't even tell from the manual. Test it, if it works then great and if not check your router firmware version and see if there are any updates available that add loopback functionality as that is about all you can do.
My router has the problem, but i still want to play!
You have two options. Use something like Hamachi to create a small private LAN between you, your server and you players or LAN players must use a SOCKS5 proxy to connect to the server. A lot of guides can be found by googling "cabal proxy" as it is a common subject. Neither is a perfect solution as Hamachi has limitations and playng via a proxy will be laggier.
What ports need to be forwarded?
38101 - 38190 is enough for up to 10 channels but remember that the channels use port 38180 upwards so if you have 15 channels then you would need 38101 - 38195. I have never actually tested if both TCP and UDP ports need forwarding, you can try just TCP and if it doesn't work or you want to be sure forward both TCP and UDP ports.
You can find many port forwarding guides spefici to your router at
People will tell you that 22, 1433 and 80 also need forwarding and this is NOT true.
22 is SSH, how you connect via putty and you don't want your players to be able to do that. Port 22 should NOT be forwarded for security.
1433 is MSSQL and you don't want your players to be able to connect to that either, only you and the server need to. 1433 shoud NOT be forwarded for security.
80 is only used by PSS in the server config and we don't use PSS so this is does not need to be forwarded unless one of your LAN machines is hosting a web server. If you have a web server forward port 80 to the web server LAN IP.
What is my own setup?
I have a router that does support loopback I don't use VMWare for my main server but i do use it for test servers and my vmware networking is set to NAT. I do not use DHCP i specify static IP addresses for all of my LAN machines including my virtual Centos servers as i know my network range is 192.0.0.x and my netmask is 255.255.255.0. Regular LAN machines use 192.168.0.2 - 192.168.0.14, my MSSQL server is 192.168.0.15, my main Cabal server is 192.168.0.20 and my virtual test servers are 192.168.0.21 upwards. To help me remember i call my virtual machines CABAL01, CABAL02 etc so i know what IP they should have from their name which avoids me accidentally giving 2 the same IP and causing a conflict.
I recommend finding out your network range and doing something similar if you have a LAN as i am sure a lot of the mysterious networking problems some people have are down to DHCP auto assigned addresses in VMWare.
What are the different networks?
LAN - Local Area Network (your home, office or university network)
WAN - Wide Area Network (the internet)
What am i connected to?
In Windows click Start->Run, type "cmd" and press Enter to get a command prompt. Type "ipconfig" and press Enter. Find your "Local Area Connection" and check it's IP Address. If it starts with 192.xxx.xxx.xxx or 10.xxx.xxx.xxx then you are connected to a LAN and will have a router.
Now go to
You must be registered to see links
and you will see you have a different IP address there. This one is your WAN IP and the one you got from ipconfig is your LAN one.If your ipconfig address matches the
You must be registered to see links
one then you don't have a router, you have a modem and are directly connected to the internet so you won't have any router-based problems!You find your Centos IP with the "ifconfig" command in a Centos terminal or putty.
Which address do i use for the server then?
If you want external people to be able to connect the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your WAN IP. If using an install script to install the server files when asked what the server's IP address should be enter the WAN one. Your /etc/odbc.ini should have the MSSQL database server IP (the LAN if you have one, WAN if you don't) and all other IP addresses should be 127.0.0.1. The client internal.txt should have the WAN IP.
If you want LAN only players then the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your LAN IP. If using an install script to install the server files when asked what the server's IP address should be enter the LAN one. Your /etc/odbc.ini should have the MSSQL database server LAN IP and all other IP addresses should be 127.0.0.1. The client internal.txt should have the LAN IP.
If using Hamachi (or similar) the IPAddress= and AddrForClient= in the /etc/cabal/WorldSvr_XX_YY.ini files should be your Centos Hamachi IP. If using an install script to install the server files when asked what the server's IP address should be enter the Centos Hamachi one. Your /etc/odbc.ini should have the MSSQL database server IP (the LAN if you have one, WAN if you don't, or the Windows machine Hamachi if using that) and all other IP addresses should be 127.0.0.1. The client internal.txt should have the Centos Hamachi IP.
The server cannot "listen" for players on both the LAN and WAN at the same time so you must pick one mode of operation. Do not use a LAN address in the IPAddress= and AddrForClient= and expect WAN players to be able to connect as the server will be "listening" on the wrong network and only LAN players will be able to connect.
Why can routers be bad?
Your router is connected to the WAN, not your computer. The router creates a small LAN for your computers to connect to and the router sits between your computer and the internet getting you the web pages/files you ask for and blocking incoming connections your computer has not asked for. The router is like a hardware firewall that filters your connection and only allows incoming connections that you have asked for.
When a connection comes in from one of your players the router will not know what the connection is for and will block it because none of your LAN computers asked for the connection. This is why you need for forward ports. When forwarding the ports you are telling your router that any incoming connections on those ports are actually expected and you are telling the router which computer on your LAN it should forward the connections to.
At a basic level this is what a router is designed to do and many home routers do not supply any more functionality than this which can be a problem for Cabal. Why?
Imagine you have set up the server correctly using the WAN IP address and also correctly forwarded your ports. Your friends are already connected and playing so you try connecting and fail!
What is happening is your router is accepting the outside connections and forwarding them to the server as expected. It sees your connection to it (it has the WAN IP remember) from inside the LAN and sees it has a forwarding rule for the port you are using, then drops the connection anyway. It is only programmed to forward connections from outside and your connection from inside doesn't qualify for forwarding because like the cabal server the router can only look at one network for forwarding. It will guide connections from outside only because, technically, you should be using an internal IP address for internal connections anyway (which we can't do with Cabal).
Not all routers suffer this problem as some have a feature called "loopback" which is an extra feature designed specifically to handle the problem and loop any connections out to the WAN and then back into a LAN address via forwarding directly back to the internal IP address.
How do i know if my router has this problem?
You normally can't even tell from the manual. Test it, if it works then great and if not check your router firmware version and see if there are any updates available that add loopback functionality as that is about all you can do.
My router has the problem, but i still want to play!
You have two options. Use something like Hamachi to create a small private LAN between you, your server and you players or LAN players must use a SOCKS5 proxy to connect to the server. A lot of guides can be found by googling "cabal proxy" as it is a common subject. Neither is a perfect solution as Hamachi has limitations and playng via a proxy will be laggier.
What ports need to be forwarded?
38101 - 38190 is enough for up to 10 channels but remember that the channels use port 38180 upwards so if you have 15 channels then you would need 38101 - 38195. I have never actually tested if both TCP and UDP ports need forwarding, you can try just TCP and if it doesn't work or you want to be sure forward both TCP and UDP ports.
You can find many port forwarding guides spefici to your router at
You must be registered to see links
and you can use an online port checker like
You must be registered to see links
to check if the ports are actually open.People will tell you that 22, 1433 and 80 also need forwarding and this is NOT true.
22 is SSH, how you connect via putty and you don't want your players to be able to do that. Port 22 should NOT be forwarded for security.
1433 is MSSQL and you don't want your players to be able to connect to that either, only you and the server need to. 1433 shoud NOT be forwarded for security.
80 is only used by PSS in the server config and we don't use PSS so this is does not need to be forwarded unless one of your LAN machines is hosting a web server. If you have a web server forward port 80 to the web server LAN IP.
What is my own setup?
I have a router that does support loopback I don't use VMWare for my main server but i do use it for test servers and my vmware networking is set to NAT. I do not use DHCP i specify static IP addresses for all of my LAN machines including my virtual Centos servers as i know my network range is 192.0.0.x and my netmask is 255.255.255.0. Regular LAN machines use 192.168.0.2 - 192.168.0.14, my MSSQL server is 192.168.0.15, my main Cabal server is 192.168.0.20 and my virtual test servers are 192.168.0.21 upwards. To help me remember i call my virtual machines CABAL01, CABAL02 etc so i know what IP they should have from their name which avoids me accidentally giving 2 the same IP and causing a conflict.
I recommend finding out your network range and doing something similar if you have a LAN as i am sure a lot of the mysterious networking problems some people have are down to DHCP auto assigned addresses in VMWare.
Last edited: