Newbie Spellweaver
- Joined
- Jul 17, 2016
- Messages
- 24
- Reaction score
- 9
This is not the prettiest fix but it does the trick of running zoneserver behind router.
I assume you have gone through the trouble of setting up the server and making login and world servers WAN accessible.
The Conflict
Zone server IP ext_address from FFDB1 > serverstatus table is used by clients connecting to the zone server and by the zone server itself when it is starting. So we have two cases:
Case 1: ext_address is set to LAN IP
Zone server will start and will listen on ext_address LAN IP successfully.
When client selects the character to enter the game it will attempt to connect to ext_address LAN IP and in result it will fail.
Case 2: ext_address is set to WAN IP
Zone server will start but fail to listen on WAN IP because there won't be network interface with that IP available.
However, when client selects the character to enter the game it will attempt to connect to ext_address WAN IP.
Edit zoneserver
Open zoneserver with hex editor and do following:
Start the server
The Workaround
My workaround simply tricks world server into sending WAN IP for the zone server, and because it loads that WAN IP address at startup we can change it in database for zone server to start with proper LAN IP.
Without the patch zone server will complain about ticket mismatch, and that is what patch does. It makes server ignore mismatched tickets.
Warning
The patch simply replaces jz (jump if zero) with jnz (just not zero). As a result this will make server think that tickets mismatch if zone server WAN IP that clients connects to and zone server LAN IP that server listens on do infact match.
Before
After
Disclaimer
Use at your own cost and risk. I do not guarantee this to work nor be safe or secure.
I assume you have gone through the trouble of setting up the server and making login and world servers WAN accessible.
The Conflict
Zone server IP ext_address from FFDB1 > serverstatus table is used by clients connecting to the zone server and by the zone server itself when it is starting. So we have two cases:
Case 1: ext_address is set to LAN IP
Zone server will start and will listen on ext_address LAN IP successfully.
When client selects the character to enter the game it will attempt to connect to ext_address LAN IP and in result it will fail.
Case 2: ext_address is set to WAN IP
Zone server will start but fail to listen on WAN IP because there won't be network interface with that IP available.
However, when client selects the character to enter the game it will attempt to connect to ext_address WAN IP.
Edit zoneserver
Open zoneserver with hex editor and do following:
Code:
Find: 0F 84 94 01 00 00 BF 18 00 00 00 4C 8D A4 24 E0
Replace with: 0F 85 94 01 00 00 BF 18 00 00 00 4C 8D A4 24 E0
Start the server
- Change FFDB1 > serverstatus > ext_address for zone server to WAN IP
- Start world server
- Change FFDB1 > serverstatus > ext_address for zone server to LAN IP
- Start zone server
The Workaround
My workaround simply tricks world server into sending WAN IP for the zone server, and because it loads that WAN IP address at startup we can change it in database for zone server to start with proper LAN IP.
Without the patch zone server will complain about ticket mismatch, and that is what patch does. It makes server ignore mismatched tickets.
Warning
The patch simply replaces jz (jump if zero) with jnz (just not zero). As a result this will make server think that tickets mismatch if zone server WAN IP that clients connects to and zone server LAN IP that server listens on do infact match.
Before
Code:
if ( v5 != ResolveTicket.ServerIP || lapis::CGlobalInfo::ZoneServerPort != ResolveTicket.ServerPort )
After
Code:
if ( v5 == ResolveTicket.ServerIP || lapis::CGlobalInfo::ZoneServerPort != ResolveTicket.ServerPort )
Disclaimer
Use at your own cost and risk. I do not guarantee this to work nor be safe or secure.
Last edited: