Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 20:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Tutorial] How to get your server running on WAN

Discussion on [Tutorial] How to get your server running on WAN within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 06/13/2009, 05:43   #31
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
@velorian

If you solved the problem, make a guide. Do some good, and shut up the forthcoming six thousand topics.
Zeroxelli is offline  
Old 06/13/2009, 06:25   #32
 
elite*gold: 0
Join Date: Jan 2006
Posts: 50
Received Thanks: 69
Quote:
Originally Posted by Zeroxelli View Post
@velorian

If you solved the problem, make a guide. Do some good, and shut up the forthcoming six thousand topics.
Ja, I was going to, but hadda have a timeout after being uber pissed at my server after 3 days of trying to get it working right xD.

If Andrew doesn't mind correcting the AuthSocket bit in his first post, changing just those on one of my computers fixed the problem but not on the other.


If you STILL can't get your server running on a WAN after following Andrew's Guide:
Note: The IPs in AuthSocket should both be your LOCAL IP (127.0.0.1)

In my case, I was unable to get the server working right after following Andrew's guide. It would only allow either a local connection or an incoming connection, but not both at the same time. I can't explain why it was doing it, but I finally solved it after toying with PacketProcessor and the server.dats. In order to get both connections working on my server the local and WAN IPs had to be swapped around in PacketProcessor.


So it would look like this:
Code:
                    if (ServerName == "CoEmu")
                    {
                        if (AuthSocket.Authorize(AccountName, Key, false))
                        {
                            CSocket.Send(Packets.AuthResponse("WAN IP", Key1, Key2));
                        }
                        else
                        {
                            CSocket.Disconnect();
                        }
                    }
                    else if (ServerName == "CoEmu.Nano")
                    {
                        if (AuthSocket.Authorize(AccountName, Key, false))
                        {
                            CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
                        }
                        else
                        {
                            CSocket.Disconnect();
                        }
                    }
                }
                else if (DBPass == "")
                {
                    Console.WriteLine("[LoginServer](Diagnostic) Set password for " + AccountName);
                    Database.Database.SetPass(AccountName, Password);
                    //OKAY to login!
                    uint Key = (uint)(Random.Next(10000000) << 32);
                    Key = Key << 32;
                    Key = (uint)(Key | (uint)Random.Next(10000000));
                    byte[] Key1 = new byte[4];
                    byte[] Key2 = new byte[4];
                    Key1[0] = (byte)(((ulong)Key & 0xff00000000000000L) >> 56);
                    Key1[1] = (byte)((Key & 0xff000000000000) >> 48);
                    Key1[2] = (byte)((Key & 0xff0000000000) >> 40);
                    Key1[3] = (byte)((Key & 0xff00000000) >> 32);
                    Key2[0] = (byte)((Key & 0xff000000) >> 24);
                    Key2[1] = (byte)((Key & 0xff0000) >> 16);
                    Key2[2] = (byte)((Key & 0xff00) >> 8);
                    Key2[3] = (byte)(Key & 0xff);
                    if (ServerName == "CoEmu")
                    {
                        if (AuthSocket.Authorize(AccountName, Key, false))
                        {
                            CSocket.Send(Packets.AuthResponse("WAN IP", Key1, Key2));
                        }
                        else
                        {
                            CSocket.Disconnect();
                        }
                    }
                    else if (ServerName == "CoEmu.Nano")
                    {
                        if (AuthSocket.Authorize(AccountName, Key, false))
                        {
                            CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
                        }
                        else
                        {
                            CSocket.Disconnect();
                        }
                    }
                }
                else
                {
                    CSocket.Send(Packets.WrongPass());
                    CSocket.Disconnect();
                }
            }
            else
            {
                Console.WriteLine("DBPass equals ERROR: " + DBPass);
                CSocket.Disconnect();
            }
        }
    }
}
As for the Server.dat
Yours should now have the server name CoEmu.Nano and 127.0.0.1 for an Ip
While any outside connections have the server name CoEmu and your WAN IP

They look like this (you):

Code:
		<field name="id">101</field>
		<field name="ServerName">CoEmu.Nano</field>
		<field name="ServerIP">127.0.0.1</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">CoEmu</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
And this (anyone else):
Code:
		<field name="id">101</field>
		<field name="ServerName">CoEmu</field>
		<field name="ServerIP">WAN IP</field>
		<field name="ServerPort">9958</field>
		<field name="FlashName">CoEmu</field>
		<field name="FlashIcon">Group3/server2.swf</field>
		<field name="FlashHint"></field>
		<field name="Child">0</field>
Again, don't ask WHY it works, or WHY it didn't work to begin with, or WHY swapping the IPs in PacketProcessor and my server.dat changed anything when they shouldn't have mattered as long as each one was pointed to the correct place. I don't know the answer to that but it works, so whatever floats the boat; I'm not going to complain.
You may only have to change the AuthSocket IP, as that was all I had to do on my 32x computer, but if your computer is as retarded as my 64x you might have to go through the entire process
velorian is offline  
Old 06/13/2009, 06:32   #33
 
elite*gold: 0
Join Date: Jan 2006
Posts: 50
Received Thanks: 69
Quote:
Originally Posted by Zeroxelli View Post
@velorian

If you solved the problem, make a guide. Do some good, and shut up the forthcoming six thousand topics.
Do you think there was something with the way it was being executed that required the IPs to be switched around before both connections could be established?
The code is identical for both types of connections so it should have, regardless of order, connected as long as it was pointed to the correct IP. But, for some reason, it wouldn't allow any outside connection to CoEmu.Nano.

Sorry for the double post again
velorian is offline  
Old 06/13/2009, 06:34   #34
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
The client won't run if the regex finds your IP in the Server.dat
Zeroxelli is offline  
Old 06/13/2009, 12:35   #35
 
elite*gold: 0
Join Date: Aug 2007
Posts: 187
Received Thanks: 45
Quote:
Originally Posted by velorian View Post
Do you think there was something with the way it was being executed that required the IPs to be switched around before both connections could be established?
The code is identical for both types of connections so it should have, regardless of order, connected as long as it was pointed to the correct IP. But, for some reason, it wouldn't allow any outside connection to CoEmu.Nano.

Sorry for the double post again
Odd I don't get any errors with my ip in both places in AuthSocket but i've added it to the front page incase its just me that dosen't have this problem.
Andrew.A is offline  
Reply


Similar Threads Similar Threads
[Help] Running my server
04/22/2009 - Zero - 2 Replies
When i run accserver it says servershell has stopped workin..any1 knw wat my prob will be?
new server up and running
07/17/2007 - Conquer Online 2 - 91 Replies
ok we have monsters npc's items and such what we dotn have is beta testers.if you would like to join are server please leave your name.your name will be yoru sign in name.just download this server.dat file and replace the one in yoru conquer 2.0 folder.any players that play unicorn do not download.this server takes place of that one.so leave your name and i will add you to this server ASAP.thanx for the help every one.



All times are GMT +1. The time now is 20:20.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.