[Tutorial] How to get your server running on WAN

06/11/2009 07:10 EatMyChidori#16
Quote:
Originally Posted by kennylai View Post
Yeah, I followed this guide too, and did what you said. Still doesn't work.
check the database connection make sure its the right info

root
pw
127.0.0.1
conqueremu
06/11/2009 07:28 kennylai#17
yeah, all my infos are correct..
06/11/2009 09:12 Andrew.A#18
Quote:
Originally Posted by kennylai View Post
yeah, all my infos are correct..
Have you put the apostrophe inbetween the "" because that will error you?



Quote:
Originally Posted by velorian View Post
k problem :D

Code:
[LoginServer] trisky logging in to CoEmu
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it ***.***.***.105:5817
at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
at System.Net.Sockets.Socket.Connect(String host, Int32 port)
at CoEmu_v2_LoginServer.Connections.AuthSocket.Authorize(String user, UInt32 key, Boolean nano)
first server setup ftl :(
Is trisky you? because you should be logging into CoEmuLoc
also is port 5817 forwarded because it need to be.

Quote:
Originally Posted by EatMyChidori View Post
i get this
If you are admin you should be logging in from 127.0.0.1
Make sure that YOUR server.dat has 127.0.0.1 and the one for others has your ip in.


I'll be home in 2 hours or so so leave me a pm if u like
06/11/2009 10:08 velorian#19
Quote:
Is trisky you? because you should be logging into CoEmuLoc
also is port 5817 forwarded because it need to be.
trisky is my tester. All ports are forwarded. Is the Loc necessary? I just left the name as it was.
06/11/2009 16:47 Andrew.A#20
Quote:
Originally Posted by velorian View Post
trisky is my tester. All ports are forwarded. Is the Loc necessary? I just left the name as it was.
The Loc just means Local as in for the person running the server to log in from.

You can't have the same name so Trisky should be logging in from CoEmuLoc as he is your tester and should be under ip 127.0.0.1 not your ip.

Quote:
Originally Posted by kennylai View Post
yeah, all my infos are correct..
Ill help you out on teamviewer just give me a PM when your online
06/11/2009 18:59 velorian#21
Quote:
Originally Posted by Andrew.A View Post
The Loc just means Local as in for the person running the server to log in from.

You can't have the same name so Trisky should be logging in from CoEmuLoc as he is your tester and should be under ip 127.0.0.1 not your ip.
When I say same name, I mean I just left it as it was in the code to begin with, which is "CoEmu" and "CoEmu.Nano" the places where you have loc would be at the 2 instances of CoEmu.Nano which are local and are pointed at 127.0.0.1
By tester I meant someone from a different network that's trying to connect to my server. That is where the instances of CoEmu are and they are pointed at my ip.
06/11/2009 19:04 Andrew.A#22
Quote:
Originally Posted by velorian View Post
When I say same name, I mean I just left it as it was in the code to begin with, which is "CoEmu" and "CoEmu.Nano" the places where you have loc would be at the 2 instances of CoEmu.Nano which are local and are pointed at 127.0.0.1
By tester I meant someone from a different network that's trying to connect to my server. That is where the instances of CoEmu are and they are pointed at my ip.
Again are you sure port 5817 is forwarded because it is denying access.

PM me your Teamviewer details so I can check your PacketProcessor
06/12/2009 02:31 velorian#23
I'm positive. 9958,5817,5816, and the ports for my server and sql database are all forwarded through my modem/router and firewall.


Wow... I really don't like Teamviewer
Here's the part of my PacketProcessor that was changed though

Code:
			        if(ServerName == "CoEmu")
			        {
                        /*if(AuthSocket.Authorize(AccountName, Key, false))
                        {
                            CSocket.Send(Packets.AuthResponse("66.187.101.86", Key1, Key2));
                        }
                        else
                        {
                            CSocket.Disconnect();
                        }*/
                        if (AuthSocket.Authorize(AccountName, Key, false))
				        {
                            CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }
			        }
			        else if(ServerName == "CoEmu.Nano")
			        {
			        	if(AuthSocket.Authorize(AccountName, Key, true))
				        {
                            CSocket.Send(Packets.AuthResponse("MY WAN IP", 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("66.187.101.86", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }*/
				        if(AuthSocket.Authorize(AccountName, Key, false))
				        {
				        	CSocket.Send(Packets.AuthResponse("127.0.0.1", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }
			        }
			        else if(ServerName == "CoEmu.Nano")
			        {
			        	if(AuthSocket.Authorize(AccountName, Key, true))
				        {
                            CSocket.Send(Packets.AuthResponse("MY WAN IP", Key1, Key2));
				        }
				        else
				        {
				        	CSocket.Disconnect();
				        }
			        }
	        	}
	        	else
	        	{
	        		CSocket.Send(Packets.WrongPass());
	        		CSocket.Disconnect();
	        	}
	        }
	        else
	        {
	        	Console.WriteLine("DBPass equals ERROR: " + DBPass);
	        	CSocket.Disconnect();
	        }
		}
	}
}
and here's the error I get on my 2nd server running on 64x computer
[Only registered and activated users can see links. Click Here To Register...]
06/12/2009 09:07 Andrew.A#24
Well thats probably the problem, apparently you cant ru nthis on 64x but ill take a look anyway.
06/12/2009 15:20 velorian#25
Quote:
Originally Posted by Andrew.A View Post
Well thats probably the problem, apparently you cant ru nthis on 64x but ill take a look anyway.
I'm running it on 2 different computers. one is 32x and one is 64x. The 32x is the one one that is actively refusing the connection and the 64x is the one that times out.
06/12/2009 17:14 Andrew.A#26
Well get teamviewer then so i can check it out
06/12/2009 18:37 velorian#27
Quote:
Originally Posted by Andrew.A View Post
Well get teamviewer then so i can check it out
I checked out teamviewer, but I have a major paranoia problem when it comes to remote desktop connections. I will host the lot of my project files, and all of my configuration files, on my server and PM you the address to it if that works but I won't use teamview.
06/13/2009 03:27 velorian#28
I narrowed it down to being exclusively in the GameServer. The connection is passing through LoginServer fine but then times out while connecting with GameServer.

edit: sorry for double post

Double edit: NVM, I got it working... finally :\ the sections for the IPs in your guide were reversed. All I did was switch around the public and local IPs in PacketProcessor. It didn't want to allow others to connect one way and wouldn't let me connect another, so I ended up switching that and a couple other things around and it finally worked >.<
06/13/2009 05:28 kennylai#29
Quote:
Originally Posted by velorian View Post
I narrowed it down to being exclusively in the GameServer. The connection is passing through LoginServer fine but then times out while connecting with GameServer.

edit: sorry for double post

Double edit: NVM, I got it working... finally :\ the sections for the IPs in your guide were reversed. All I did was switch around the public and local IPs in PacketProcessor. It didn't want to allow others to connect one way and wouldn't let me connect another, so I ended up switching that and a couple other things around and it finally worked >.<
What did you do? I've got the same problem as you, lol
06/13/2009 05:38 velorian#30
Quote:
Originally Posted by kennylai View Post
What did you do? I've got the same problem as you, lol
It might work if you just change both IPs in AuthSocket to 127.0.0.1, but it wouldn't for me, so follow the pm i sent you.