Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 06-17-2004, 06:29 PM   #1 (permalink)
Newbie
 
Join Date: Jun 2004
Posts: 81
Default Another connection problem!

Ok, I seem to be having some connection problems. I've already gone through all the steps here http://www.runuo.com/documentation.php which consists of editing my serverlist.cs to my IP which was found from the link within. I have also opened port 2593 (yes, i finally got it working for those of you who saw my other post). It seems I can connect within the network using my internal IP but when I give people my IP (both my internal and the one that is set in serverlist.cs) they cannot connect. I have even set myself DMZ and they still can't connect!! Any help would be greatly appreciated

--Thank You
Heftiger is offline   Reply With Quote
Old 06-17-2004, 08:08 PM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by Heftiger
Ok, I seem to be having some connection problems. I've already gone through all the steps here http://www.runuo.com/documentation.php# which consists of editing my serverlist.cs to my IP which was found from the link within. I have also opened port 2593 (yes, i finally got it working for those of you who saw my other post). It seems I can connect within the network using my internal IP but when I give people my IP (both my internal and the one that is set in serverlist.cs) they cannot connect. I have even set myself DMZ and they still can't connect!! Any help would be greatly appreciated

--Thank You
Don't use DMZ its a dangerous work around.

Post your serverlist.cs and forward the port ( its really simple, same as dmz just on one port ).
Phantom is offline   Reply With Quote
Old 06-17-2004, 08:23 PM   #3 (permalink)
Newbie
 
Join Date: Jun 2004
Posts: 81
Default

Quote:
Originally Posted by Phantom
Don't use DMZ its a dangerous work around.

Post your serverlist.cs and forward the port ( its really simple, same as dmz just on one port ).
Yes I know about DMZ, I set it up just for testing purposes. I have already forawrded the port, here is my serverlist.cs file:


using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public const string Address = "68.189.67.114";

public const string ServerName = "Heftiger's Uber Server";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{
try
{
outValue = IPAddress.Parse( addr );
return true;
}
catch
{
try
{
IPHostEntry iphe = Dns.Resolve( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;
IPHostEntry iphe = Dns.Resolve( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList[i] );

return contains;
}
}
}
Heftiger is offline   Reply With Quote
Old 06-17-2004, 08:25 PM   #4 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Unless thats not your IP or you didn't forward the port.

It will work.
Phantom is offline   Reply With Quote
Old 06-17-2004, 08:30 PM   #5 (permalink)
Newbie
 
Join Date: Jun 2004
Posts: 81
Default

Quote:
Originally Posted by Phantom
Unless thats not your IP or you didn't forward the port.

It will work.
It is my IP, found it using a few different web application and I have forwarded it. On my belkin router port forwarding is called "Application Gateway" but it should be the same as port forwarding.

Also, in the memo for routers is says somethign about "privite const string address", do I need to change my public to private? Or is that a typo?
Heftiger is offline   Reply With Quote
Old 06-17-2004, 10:18 PM   #6 (permalink)
 
Join Date: Jun 2004
Age: 29
Posts: 10
Default This may help.

This solution worked for me. I run my server on a machine burried deep in my local network..

first add this line to your ServerList.cs

Code:
public const string LocalServerAddress = "put internal ip address here";
place the above line after this one..
Code:
public const string Address = "external ip address";
This will bind the server to both your internal and external ip address.
Note that when the server is started you will only see the localhost ip of 127.0.0.1 and the internal ip address.

You can use this nice small and freeware port mapper if your server is in the network behind another machine. If it is behind a router then you'll have to seek for another solution. Last time I tried to run the server hehind a router I had no luck. Did away with that whole setup and built a file server machine that acts as a router also.

AnalogX Portmapper

Dont forget to disable the built in firewall that windows xp is always determined to use, if Xp is your os of choice. If you choose to leave this running then you will need to set port forwarding for the primary network adapter on your server machine to allow the needed port to be open for each ip address. Your localhost, internal and external. Otherwise the dataflow fromt the server to client will get interupted by the firewall.
ocalit is offline   Reply With Quote
Old 06-17-2004, 10:26 PM   #7 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

public const string LocalServerAddress = "put internal ip address here"

Unless you added a server that uses this code, then it does nothing.
Phantom is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5