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 10-20-2006, 12:15 AM   #1 (permalink)
Lurker
 
Join Date: Jun 2006
Age: 23
Posts: 11
Default DNS Connection Problems

I am haveing trouble haveing users connect though a domain name to my server.(Well one user, but hes the only one that connects)

He can connect perfectly though IP to my address. That works fine. My router lets and through and every thing.

Now when I use my domain name "elements.ath.cx" it won't work.
He gets to the screen where you choose a shard then when he picks it kicks him off.

I am not really sure what I am doing wrong here. I have it in my server list. I got my domain name updated with my dynamic address. I am able on my own computer to connect through my domain name. When I ping the domain name it seems to get to my server.

when the user connects through UOGateway he has
elements.ath.cx under the dns/ip input

Does any one else have this problem or had this problem before.

In the past I also used this domain name for web services, but back then it worked half the time. :\

My serverlist file.
Code:
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 static readonly string Address = "elements.ath.cx";

		public const string ServerName = "Terisa";

		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 )
		{

            if ( IPAddress.TryParse( addr, out outValue ) )
                return true;

			try
			{
				IPHostEntry iphe = Dns.GetHostEntry( 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.GetHostEntry( Dns.GetHostName() );

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

			return contains;
		}
	}
}
Epo35 is offline   Reply With Quote
Old 10-21-2006, 01:11 AM   #2 (permalink)
Forum Expert
 
Mo Khan's Avatar
 
Join Date: Jan 2006
Location: Western Kentucky
Age: 41
Posts: 575
Default

Is your router configured to allow access to this DNS?
__________________
Mo Khan - Senior Compubonics Interpreter
Acrid Garden - owner/administrator

Quote:
Originally Posted by Radwen
T h i s t h r e a d i s a l l a b o u t b u l l s h i t.
Quote:
Originally Posted by Lord Kaza
It isn't legal for me to get laid, lol. (age 12)
_
Mo Khan is offline   Reply With Quote
Old 10-21-2006, 01:15 AM   #3 (permalink)
Forum Expert
 
Join Date: Sep 2002
Age: 25
Posts: 374
Default

Likely your server is not resolving the DNS in the serverlist correctly. I would suggest mrfixit's serverlist since it will retreave the correct IP address from a 3rd party website, thus bypassing DNS resolving. Your friend will still be able to use the domain name.
Quinox 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