Can't connect to myself

09/05/2008 19:29 SnapCrakllPop#1
Here's what's up:

-I'm using ShadowCO source.
-I'm NOT using hamachi.
-I have my computer in the network DMZ. (All ports are open)
-My friend in Oklahoma can connect to my server and play on it and I'm in New Hampshire.
-I'm using CIDLoader to connect to IP 127.0.0.1 (for self-connecting. I did try using my own IP and it didn't work at all).
-I'm using a 5017 client, same as my friend that connected to me.
-When I try to log-in to my own server I get the error that "Failed to connect to game server."
-When I do that, the ShadowCO window says "Successful login for account Admin." (Admin is the name of the account I created for myself.)

Does anyone know why I can't connect to myself?
09/05/2008 20:40 Mouse>Pro#2
if you get an error about the server.dat is damaged then you need the cidloader
09/05/2008 21:32 taguro#3
Quote:
Originally Posted by SnapCrakllPop View Post
Here's what's up:

-I'm using ShadowCO source.
-I'm NOT using hamachi.
-I have my computer in the network DMZ. (All ports are open)
-My friend in Oklahoma can connect to my server and play on it and I'm in New Hampshire.
-I'm using CIDLoader to connect to IP 127.0.0.1 (for self-connecting. I did try using my own IP and it didn't work at all).
-I'm using a 5017 client, same as my friend that connected to me.
-When I try to log-in to my own server I get the error that "Failed to connect to game server."
-When I do that, the ShadowCO window says "Successful login for account Admin." (Admin is the name of the account I created for myself.)

Does anyone know why I can't connect to myself?
@Mouse->he said hes using the CIDLoader.
@SnapCrakllPop->go to [Only registered and activated users can see links. Click Here To Register...] use the ipaddress it shows you. If everything else is set up right, then it should be working.
09/05/2008 21:44 SnapCrakllPop#4
@taguro
I did this already using whatismyip.com

Didn't work =[

So basically I have a server that I can't play on xD
09/05/2008 22:26 taguro#5
Quote:
Originally Posted by SnapCrakllPop View Post
@taguro
I did this already using whatismyip.com

Didn't work =[

So basically I have a server that I can't play on xD
1) Are you behind a router?
2) Do you use port forwarding? If so, which ports are forwarded?
09/05/2008 22:40 SnapCrakllPop#6
Quote:
Originally Posted by taguro View Post
1) Are you behind a router?
2) Do you use port forwarding? If so, which ports are forwarded?
All of them haha. Being in the network DMZ means my computer isn't subjectto the router firewall. So all of my ports are open. That's why my buddy can connect to me.
09/06/2008 00:53 taguro#7
Quote:
Originally Posted by SnapCrakllPop View Post
All of them haha. Being in the network DMZ means my computer isn't subjectto the router firewall. So all of my ports are open. That's why my buddy can connect to me.
Perhaps your ISP is blocking port 9958; try using a different port in your server.dat or loader.dat
09/06/2008 01:02 andyd123#8
I'm not sure exactly how ShadowCO source works but it's quite simple.

I'm sure the source lets you set an IP for use to listen to.

Basically, when you connect to the login server, the login server sends you a packet telling the client where the game server is(IP + Port)

MORE THEN LIKELY the login server is telling you to connect to your WAN ip address(which is the one your friend is connecting to) since I'm not sure if ShadowCo source is preset to accept multiple server names.

In order to fix this, you need to add a switch that checks where the login is coming from to the login server.
IE:
If the login is locally(from your local ip, or 127.0.0.1), then tell the client that the server is located at 127.0.0.1:5816
If the login is from the WWW(any non-local ip) tell the client that the server is located at (your wan ip):5816.

If you don't get what this means say so and I'll try to explain better.

My method for doing so is like this(which uses different server names):
Code:
//This looks up the server name that is sent from the client during the login server //connection
string SIP = Database.LookupServer(ServerName);
                if (SIP == "Invalid")
                {
                    SIP = "127.0.0.1";
                    //"Invalid" is thrown if the database doesn't contain that server
                }
                byte[] ReturnPacket2 = PacketGenerate2.AuthResponse(SIP, Key1, Key2);
09/06/2008 01:06 taguro#9
Quote:
Originally Posted by andyd123 View Post
I'm not sure exactly how ShadowCO source works but it's quite simple.

I'm sure the source lets you set an IP for use to listen to.

Basically, when you connect to the login server, the login server sends you a packet telling the client where the game server is(IP + Port)

MORE THEN LIKELY the login server is telling you to connect to your WAN ip address(which is the one your friend is connecting to) since I'm not sure if ShadowCo source is preset to accept multiple server names.

In order to fix this, you need to add a switch that checks where the login is coming from to the login server.
IE:
If the login is locally(from your local ip, or 127.0.0.1), then tell the client that the server is located at 127.0.0.1:5816
If the login is from the WWW(any non-local ip) tell the client that the server is located at (your wan ip):5816.

If you don't get what this means say so and I'll try to explain better.

My method for doing so is like this(which uses different server names):
Code:
//This looks up the server name that is sent from the client during the login server //connection
string SIP = Database.LookupServer(ServerName);
                if (SIP == "Invalid")
                {
                    SIP = "127.0.0.1";
                    //"Invalid" is thrown if the database doesn't contain that server
                }
                byte[] ReturnPacket2 = PacketGenerate2.AuthResponse(SIP, Key1, Key2);
Never thought about it being a coding thing...
09/06/2008 01:47 andyd123#10
Quote:
Originally Posted by taguro View Post
Never thought about it being a coding thing...
It's not really a "coding thing" it's how the client works.

I've never seen the shadow co source, if someone could link me to it I could probably whip up a fix.
09/06/2008 03:17 SnapCrakllPop#11
I'm a pretty horrible coder, so I don't know where to put that or how to use it, so here's a link to the code:

[Only registered and activated users can see links. Click Here To Register...]

First post there is the source I'm using.

I'm learning to code as I go.

I've used infamousnoone's video series, but I'm more of a hands-on learner. I can't just watch the videos and memorize everything.

Thanks for your help,
SCP
09/06/2008 03:29 andyd123#12
Quote:
Originally Posted by SnapCrakllPop View Post
I'm a pretty horrible coder, so I don't know where to put that or how to use it, so here's a link to the code:

[Only registered and activated users can see links. Click Here To Register...]

First post there is the source I'm using.

I'm learning to code as I go.

I've used infamousnoone's video series, but I'm more of a hands-on learner. I can't just watch the videos and memorize everything.

Thanks for your help,
SCP

The simplest way to do this with minimal edit would be to send a local ip for a certain account.
do you use a certain account to connect with, or do you have multiple accounts?
09/06/2008 05:12 SnapCrakllPop#13
I'll be using one account. Also I found that it works. I put 127.0.0.1 as the server IP, then put that in my server.dat and I could connect. But obviously that would prevent non-local connections...

Thanks,
SCP
09/06/2008 05:34 andyd123#14
Quote:
Originally Posted by SnapCrakllPop View Post
I'll be using one account. Also I found that it works. I put 127.0.0.1 as the server IP, then put that in my server.dat and I could connect. But obviously that would prevent non-local connections...

Thanks,
SCP
Yes! Therein lies the problem.

What account name would it be? I can give you the code that would make your account connect back locally, if you'd like.

Just tell me EXACT account name you'd use.
09/06/2008 15:20 SnapCrakllPop#15
I would be using account Admin with pass 0 (zero).