Making server public with Dynamic IP behind NAT (router) (hosted on 2 machines).
So i make i simply tutorial for noobs how make your server hosted on 2 machines public if you have dynamic IP address and your machines are behind NAT.
1. Configuring your router.
In this step we need to setup first ddns (Dynamic Domain Name Server) on our router. Most of Cisco, Linksys by Cisco routers support by default ddns service from dyndns.org or tzo.com.
In tutorial i use Linksys WAG200G ADSL Home Gateway router.
First we need to login into router administration panel.
For this open a web browser and type there your router IP address. In Linksys WAG200G by default (like in most of routers): 192.168.1.1
1. Here you put your dyndns.org username.
2. Here you put your dyndns.org password.
3. Here you put your domain name what you created in dyndns.org, example: myserver.dyndns.org
4. Here will be displayed your isp dynamic IP
Q & A:
Q: Where i can get my dyndns free account?
A: You can register your free dyndns.org account at this link
Q: How much it cost?
A: DynDNS is free in basic option and cost 0 until you decide to use DynDNS Pro - it is paid service.
Next step is setting up port forwarding in your router.
1. Here give a name your application for what you want redirect port.
2. Here put number of port which you want to redirect.
3. Here put number of port to which you want redirect destination port.
4. Put here ip adress of machine to where you want forward all packets sent on destination port.
Make check on enable redirection.
Example: You have installed Apache Server on your pc and your Apache using port 80 by default (you can also configure Apache to work with another port).
http service using port 80.
So you can put in your config:
Application - http
External port - 80
Internal port - 80 (or any another what your Apache Server or IIS using)
IP address - here you put your machine local ip address where you have installed Apache Server or IIS, example 192.168.1.100
So same for game client connection to server:
Application - Game Client
External port - 15779
Internal port - 15779
IP address - here you put your 1st machine local ip addresss, example 192.168.1.100
And now your server is accesable by all without hamachi or vpn.
You need also have opened all needed ports between 2 machines but this u set in each machine.
Comments:
You can meet also another private networks addressing:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
Your private network in home between hosts should work correctly if you want to make your server public.
The best is when your router give static ip to hosts inside your private network - related to MAC address of host - i mean if your ip doesnt change at evry shutting down ur pc and so.
Make sure you not gave to your hosts network base IP or broadcast IP address because your network not will work correctly.
2. Configuring Certification and server.cfg
So next step is correct configuration of Certification and server.cfg
First Certification:
You need to edit your srNodeType.ini:
Now setup of your server.cfg
3. Making your game launcher able to connect your server.
So we need PK2Extractor, PK2Editor, DivisionManager.
We need to open our Media.pk2 in PK2Extractor and extract from it DIVISIONINFO.txt file.
After we open extracted DIVISIONINFO.txt with DivisionManager and we delete all existing divisions. Than we press on Add new division. You can name it however you want, example DIV01. Than we click with mouse once on this division and we press ADD SERVER - we put there our domain created by us in dyndns.org example: myserver.dyndns.org
You save your DIVISIONINFO.txt and upload it back into your Media.pk2 by PK2Editor.
Your client is now configured to connect with your game server without using hamachi!
Tutorial created by me. Don't release it under your name. I not want see this tutorial on epvp. If you want post this tutorial on another forum (expect epvp) email me!
If i helped you or if u like my tutorial press Like !
Cheers,
tomas0801
So i make i simply tutorial for noobs how make your server hosted on 2 machines public if you have dynamic IP address and your machines are behind NAT.
1. Configuring your router.
In this step we need to setup first ddns (Dynamic Domain Name Server) on our router. Most of Cisco, Linksys by Cisco routers support by default ddns service from dyndns.org or tzo.com.
In tutorial i use Linksys WAG200G ADSL Home Gateway router.
First we need to login into router administration panel.
For this open a web browser and type there your router IP address. In Linksys WAG200G by default (like in most of routers): 192.168.1.1
You must be registered to see links
1. Here you put your dyndns.org username.
2. Here you put your dyndns.org password.
3. Here you put your domain name what you created in dyndns.org, example: myserver.dyndns.org
4. Here will be displayed your isp dynamic IP
Q & A:
Q: Where i can get my dyndns free account?
A: You can register your free dyndns.org account at this link
You must be registered to see links
Q: How much it cost?
A: DynDNS is free in basic option and cost 0 until you decide to use DynDNS Pro - it is paid service.
Next step is setting up port forwarding in your router.
You must be registered to see links
1. Here give a name your application for what you want redirect port.
2. Here put number of port which you want to redirect.
3. Here put number of port to which you want redirect destination port.
4. Put here ip adress of machine to where you want forward all packets sent on destination port.
Make check on enable redirection.
Example: You have installed Apache Server on your pc and your Apache using port 80 by default (you can also configure Apache to work with another port).
http service using port 80.
So you can put in your config:
Application - http
External port - 80
Internal port - 80 (or any another what your Apache Server or IIS using)
IP address - here you put your machine local ip address where you have installed Apache Server or IIS, example 192.168.1.100
So same for game client connection to server:
Application - Game Client
External port - 15779
Internal port - 15779
IP address - here you put your 1st machine local ip addresss, example 192.168.1.100
And now your server is accesable by all without hamachi or vpn.
You need also have opened all needed ports between 2 machines but this u set in each machine.
Comments:
You can meet also another private networks addressing:
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
Your private network in home between hosts should work correctly if you want to make your server public.
The best is when your router give static ip to hosts inside your private network - related to MAC address of host - i mean if your ip doesnt change at evry shutting down ur pc and so.
Make sure you not gave to your hosts network base IP or broadcast IP address because your network not will work correctly.
2. Configuring Certification and server.cfg
So next step is correct configuration of Certification and server.cfg
First Certification:
You need to edit your srNodeType.ini:
Code:
[global]
count=2
[entry0]
id=335
operation_type=22
name=Sro Road 1
wip= [COLOR="Red"][B]here put your 1st machine local ip, example 192.168.1.100[/B][/COLOR]
nip= [COLOR="Red"][B]here put your 1st machine local ip, example 192.168.1.100[/B][/COLOR]
machine_manager_node_id=699
[entry1]
id=336
operation_type=22
name=Sro Road 2
wip= [COLOR="Red"][B]here put your 2nd machine local ip, example 192.168.1.101[/B][/COLOR]
nip= [COLOR="Red"][B]here put your 2nd machine local ip, example 192.168.1.101[/B][/COLOR]
machine_manager_node_id=701
Now setup of your server.cfg
Code:
Common {
debug_option_debugger_present{
DEBUG_OPTION_ASSERT_SHOW_MESSAGEBOX_OKCANCEL,
DEBUG_OPTION_ASSERT_ADVANCE_BREAK,
DEBUG_OPTION_ASSERT_CANCEL_EXIT
}
debug_option_stand_alone{
DEBUG_OPTION_ASSERT_DONOT_SHOW_MESSAGEBOX,
DEBUG_OPTION_ASSERT_WRITE_MINIDUMP
}
netengine_debug_option_debugger_present{
DEBUG_OPTION_ASSERT_DONOT_SHOW_MESSAGEBOX,
DEBUG_OPTION_ASSERT_WRITE_MINIDUMP
}
netengine_debug_option_stand_alone{
DEBUG_OPTION_ASSERT_DONOT_SHOW_MESSAGEBOX,
DEBUG_OPTION_ASSERT_WRITE_MINIDUMP
}
}
////////////////////////////////////////////////////////////////////////////////////////////
GlobalManager {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 32000
LoginFailureTolerance 3
IBUVFailureTolerance 3
LoginFailureBlockTimeMin 0
IBUVFailureBlockTimeMin 0
AutomatedPunisher "AutomatedPunisher"
LoginPunishmentGuide "Blocked for 10 minutes due to incorrect password entered 3 times"
LoginPunishmentDescription "Blocked for 10 minutes due to incorrect password entered 3 times"
IBUVPunishmentGuide "Blocked for 10 minutes due to incorrect code entered 3 times"
IBUVPunishmentDescription "Blocked for 10 minutes due to incorrect code entered 3 times"
}
GatewayServer {
LastFullVersion_SR_Client 130
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15880
IBUVQueueReserveCount 20000
IBUVQueuePrepareRatio 0.10
IBUVFailureIPTolerance 0
IBUVStringSize 1
IBUVCharacterSet "ABCDEF1234567890"
}
DownloadServer {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15880
}
FarmManager {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15880
}
AgentServer {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15882 //no global manager running lol
//traffic_filter_activity "service_off"
//MaxUser 5000
//SockTCPCount 15000
MaxConnectionsPerServer "5000"
MaxConnectionsPer1_OServer "5000"
}
MachineManager {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15880
CERTIFICATION_IP_BIND "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]"
}
SR_GameServer {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15882
SockTCPCount "5000"
ExpRatio "100000"
ExpRatioParty "110000"
DropItemRatio "50000"
DropGoldAmountCoef "20000"
HwanGainFactor "250"
ShowFormulaDetail "1"
//WINTER_EVENT_2009 EVENT_ON
//EUBUSINESS_EVENT EVENT_ON
//GOLDEN_PIG_FEBRUARY_EVENT EVENT_ON
//THANKS_GIVING_EVENT EVENT_ON
//LIBERATION_EVENT EVENT_ON
LOCALE LOCALE_VIETNAM
//#ifdef OPEN_MARKET_SYSTEM
SET_FEE_RATE "0,5,5,5"
SELL_FEE_RATE "0,10,10,10"
//#endif OPEN_MARKET_SYSTEM
//RE FTW
DO_NOT_SPAWN_MONSTER_OVER_MAX_SERVICE_LEVEL "OFF"
ENTER_LIMIT_CONDITION_GAME_WORLD_ASSIGNED "OFF"
}
SR_ShardManager {
Certification "[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]", 15882
BILLING_SERVER_URL "http://[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]:8080/"
CREST_FTP_URL "ftp://[COLOR="Red"][B]your_ftp_login[/B][/COLOR]:[COLOR="Red"][B]ftp_password[/B][/COLOR]@[COLOR="Red"][B]your 1st machine local ip[/B][/COLOR]/"
ChristmasEvent2007 1
SERVER_EVENT_SYSTEM ON
LOCALE LOCALE_VIETNAM
FlagEvent 1
//HourForMeterRateLevelFirst 22
//HourForMeterRateLevelSecond 23
BattleArenaRandom 1
BattleArenaParty 1
BattleArenaGuild 1
BattleArenaJob 1
ArenaMatchOccupy 1
ArenaMatchFlag 1
ArenaMatchPoint 1
}
3. Making your game launcher able to connect your server.
So we need PK2Extractor, PK2Editor, DivisionManager.
We need to open our Media.pk2 in PK2Extractor and extract from it DIVISIONINFO.txt file.
After we open extracted DIVISIONINFO.txt with DivisionManager and we delete all existing divisions. Than we press on Add new division. You can name it however you want, example DIV01. Than we click with mouse once on this division and we press ADD SERVER - we put there our domain created by us in dyndns.org example: myserver.dyndns.org
You save your DIVISIONINFO.txt and upload it back into your Media.pk2 by PK2Editor.
Your client is now configured to connect with your game server without using hamachi!
Tutorial created by me. Don't release it under your name. I not want see this tutorial on epvp. If you want post this tutorial on another forum (expect epvp) email me!
If i helped you or if u like my tutorial press Like !
Cheers,
tomas0801
Last edited: