Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

A basic guide to networking, what IP addresses to use etc

The Dinosaur
Loyal Member
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 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 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 and you can use an online port checker like 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:
Newbie Spellweaver
Joined
Feb 24, 2007
Messages
9
Reaction score
0
yes but i use WIndows Vista! and My CentOS 4.6 not see windows Ip adress !..

HELP -ME PLZ :(:


see

chumpywumpy - A basic guide to networking, what IP addresses to use etc - RaGEZONE Forums



chumpywumpy - A basic guide to networking, what IP addresses to use etc - RaGEZONE Forums


Not work in Windows vista???


my VMware settings here:

chumpywumpy - A basic guide to networking, what IP addresses to use etc - RaGEZONE Forums
 
The Dinosaur
Loyal Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
It should be fine in Vista. Are you manually specifying the IP address Centos is using or using DHCP (auto)? This is the exact problem i mention at the bottom of the guide so try setting it manually if it is on auto.

The last server i looked at for somebody that was having this problem i just reinstalled centos and specified the IP manually and that fixed it. It took about 15 mins.
 
Newbie Spellweaver
Joined
Jan 7, 2009
Messages
6
Reaction score
0
chumpywumpy this is my problem- WinSCP give me eror Connection TImed Out ?!? Why i dont have router IP.
chumpywumpy - A basic guide to networking, what IP addresses to use etc - RaGEZONE Forums
 
Initiate Mage
Joined
Feb 13, 2009
Messages
3
Reaction score
0
I got a server conect directly to WAN, X.X.X.191, the vmware is set to bridged, the centos ip config is set manualy to X.X.X.193.
I got no lan, only 1 wan ip.
the wan_check.sh give me nothing.
mssql ip its set to 127.0.0.1 and seems to be ok.
but, i cant connect, i try 191 and 193 and get no conections
 
Initiate Mage
Joined
Jan 14, 2010
Messages
3
Reaction score
1
Boss chump i would like to ask...i dont have a router...can i still play cabal offline....tnx..mr. chump....your da best...
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 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 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 and you can use an online port checker like 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.


---------- Post added at 05:20 AM ---------- Previous post was at 05:03 AM ----------

boss chump.......i was able to answer my own question...i found my answer on your post about lan and wan...your post is so helpful and useful...tnx alot....god bless

---------- Post added at 05:24 AM ---------- Previous post was at 05:20 AM ----------

boss chump.......i was able to answer my own question...i found my answer on your post about lan and wan...your post is so helpful and useful...tnx alot....god bless
 
Junior Spellweaver
Joined
Feb 16, 2009
Messages
168
Reaction score
7
why wincp can't login after insert wan ip at centos??
 
Newbie Spellweaver
Joined
Feb 27, 2010
Messages
16
Reaction score
0
i can ping this ip from , but i cant ping the ip from my network on centos, how =/ i cant connect to winscp
 
Junior Spellweaver
Joined
Apr 24, 2006
Messages
173
Reaction score
2
Did i install CentOS wrong? The video guide with centos installing didn't help me because it was with CentOS 4.7 and i'm using 5.4 and i get this IP adress (my normal IP). I tried pinging it, i got all bytes sent, no pachet losses.

chumpywumpy - A basic guide to networking, what IP addresses to use etc - RaGEZONE Forums



Everytime i start WinSCP, type in IP, user and password i press the connect button or whatever it is and it hungs up, not responding and after a few sec i get "Reconnecting"
 
Last edited:
Experienced Elementalist
Joined
Oct 20, 2009
Messages
241
Reaction score
9
ive tryed installing centos wit manual ip config... and i got no internet on centos that way..but if i choose auto.. then there is internet... wuts the prob ?
 
Newbie Spellweaver
Joined
Nov 26, 2009
Messages
16
Reaction score
2
Heydi ho chumpy ;) .... I was wondering... I want my server to be offline ( only me) so i went one method
Windows IP: 192.168.2.1
CentOS IP: 192.168.2.2

But my problem is i can't ping neither of them... I searched the forum but I found answers to ppls who want and online server but none for offline... so some help... also if there is already a thread to it could you give me link since all i found from searching was for online servers...

P.S. If you need any other info just ask :)

Cheers :)


EDIT: NVM I got it

I went for online server, and I changed VMware settings from WM-0 to WM-2 ;) Cheers and tx chupmy ;)
 
Last edited:
Initiate Mage
Joined
Dec 27, 2008
Messages
2
Reaction score
0
Hey chumpy. Everything is ready here, but i've got one problem. "Some other host is using adress xxx.xxx.xxx.xxx. My internet is configured to DCHP. What should i do? Thanx in advance
 
Newbie Spellweaver
Joined
Mar 26, 2007
Messages
29
Reaction score
0
I have a router
I have to open the ports (38190, 38170, 38121, 38111, 38180, 38181) in the router to connect users ...???


my vmware is bridged ...


my centos ip is 192.168.1.100 not use DHCP to configure it manually and I can connect to internet ...


my windows ip is 192.168.1.16...


I have a ping between two PCs right ..


I have to do port forwarding ... windows to centos ... or not necessary if my setup as bridge ...???


the question is ...!


Centos IP 192.168.1.100
Windows IP 192.168.1.12
Wan IP XXX XXX XXX XXX


I have to put that ip for my users connect from internet ...??? since both are in LAN PCs ...


no matter if the LAN can not connect ...!!!:cool:
 
Last edited:
Newbie Spellweaver
Joined
Jun 24, 2013
Messages
24
Reaction score
0
Hey Guys,

how can i play cabal with my WAN IP? i have a few ppl they want play on my server. But he can´t connect while i have set the LAN IP. So can everyone help me? Please Guys!!!
 
Back
Top