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 03-04-2007, 12:13 AM   #1 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default Cannot Login

Ok, my shard is public with ConnectUO, and people can login when I give them my ip address. But you can't login by using ConnectUO. I don't have my firewall on, and I have port forwarded (is there anyway it could have closed the port accidentally, only thing I can think of). Thanks for help.
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 12:24 AM   #2 (permalink)
Forum Novice
 
Join Date: Sep 2006
Posts: 100
Send a message via AIM to zartanian
Default

Did you forward the port on your router and open the port on the firewall? Router & PC
__________________
New Kid on the block looking for help at times and helping when I can
zartanian is offline   Reply With Quote
Old 03-04-2007, 12:35 AM   #3 (permalink)
Forum Expert
 
DreamCatcher's Avatar
 
Join Date: Jan 2006
Location: Kenaz:The Rebirth...You'll find it on ConnectUO ;)
Posts: 1,637
Default

what router and model do you have?
__________________
**Fun things to do**
Put decaf in the coffee maker for 3 weeks. Once everyone has gotten over their caffeine addictions, switch to espresso.:D :eek:
DreamCatcher is offline   Reply With Quote
Old 03-04-2007, 03:01 AM   #4 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

Yes I did open port on router, and my firewall is turned off therefore I shouldn't have to open it. My router is a Bell Speedstream 6520.
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 03:20 AM   #5 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

Just checked and Port 2593 is open.... So port forwarding isn't the problem.
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 03:28 AM   #6 (permalink)
Forum Expert
 
WeEzL's Avatar
 
Join Date: Apr 2006
Location: The Great White North!
Age: 33
Posts: 887
Default

Quote:
Originally Posted by nekron_14 View Post
Ok, my shard is public with ConnectUO, and people can login when I give them my ip address. But you can't login by using ConnectUO.
How are people connecting to your shard if they can't use ConnectUO? Razor perhaps? Does the server console say anything when they try to connect using ConnectUO?
__________________
I R GEEK!
WeEzL is offline   Reply With Quote
Old 03-04-2007, 03:29 AM   #7 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

The server console doesn't say anything when you try to login (I've been trying to get on using my other comp).
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 03:40 AM   #8 (permalink)
Forum Novice
 
Join Date: Nov 2006
Posts: 335
Default

Mr.Fixit Fixes it all....

backup your serverlist.cs to whatever and make your new serverlist this (dont forget to set port and server name {the script autodetects your ip})

Give it a shot

Code:
// ==================================================================================================
// ServerList.cs
// ==================================================================================================
//     1.0  RunUO Beta 36 Initial version
//     1.1  Mr Fixit Now automaticly detects if you are connecting localy and uses the
//    servers local ip in the client serverlist.
// 1.2 Mr Fixit Internet IP autodetection using WhatIsMyIP.com - 75.126.37.2.
//   1.3 Mr Fixit If script fails to find the internet ip, keep the old one and try
//    again in # minutes.
//      1.4 Mr Fixit You can now add AutoIP mirrors. Added whatismyip.com and myip.com.
//      1.5 Mr Fixit Adjusted the AutoIP mirror engine so it supports more mirrors.
//    Added findmyip.com and ipaddy.com.
//      1.6 Mr Fixit IP is now trimmed (Just in case). Added simflex.com, edpsciences.com,
//    ipid.shat.net and checkip.dyndns.org.
//      1.7     Mr Fixit        Removed WhatIsMyIP.com - 75.126.37.2 is it seems to be out of buisness.
//      1.8     Mr Fixit        Added a message to the console with ServerList.cs version when server loads.
//    Now detects the internet ip when the server starts.
//    Now checks if the ip has changed every 60 minutes instead of 30 minutes.
//      1.9     Mr Fixit        Removed noip.com mirror as it isnt working anymore.
//      2.0     Mr Fixit        Now only renews the ip every 24 hours (1440 minutes).
// ==================================================================================================
using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;
namespace Server.Misc
{
 public class ServerList
 {
  // ==================================================================================
  // YOUR SERVERS NAME
  // ==================================================================================
  public const string ServerName = "SHARD NAME HERE";
  // ==================================================================================
  // YOUR INTERNET IP OR DNS NAME
  // Here you can select to autodetect your internet ip, or manualy specify
  // Examples:
  // public static string Address = "12.34.56.78";
  // public static string Address = "shard.host.com";
  // ==================================================================================
  public const bool InternetIPAutodetect = true;
  public const int MinutesBetweenIPAutodetect = 14400;
  public static string Address = "00.000.00.00";
  
  // ==================================================================================
  // Here are some values stored
  // ==================================================================================
  private static LocalLanIPRange[] LocalLanIPRanges = new LocalLanIPRange[10];  
  private static UInt32 LocalLanIPRangesCount;
  private static AutoIPMirror[] AutoIPMirrors = new AutoIPMirror[10]; 
  private static UInt32 AutoIPMirrorsCount;
  private static DateTime InternetIPAutodetectLast;
  
  // ==================================================================================
  // Initialization
  // ==================================================================================
  public static void Initialize()
  {
   // ----------------------------------------------------
   // Select what port to use
   // ----------------------------------------------------
   Listener.Port = 2593;
   // ----------------------------------------------------
   // Load the local LAN ip ranges
   // ----------------------------------------------------
   AddLocalLANIPRange("10.0.0.0", "10.255.255.255");
   AddLocalLANIPRange("192.168.0.0", "192.168.255.255");
   AddLocalLANIPRange("172.16.0.0", "172.32.255.255");
   AddLocalLANIPRange("169.254.0.0", "169.254.255.255");
   // ----------------------------------------------------
   // Load the Auto IP mirros
   // ----------------------------------------------------
   //AddAutoIPMirror("What's My IP?", "Your IP address is:<br>", "</FONT>");
   AddAutoIPMirror("What Is My IP Address? The IP Address Lookup Tool - Your IP is: 75.126.37.2", "Your IP address is: ", "<br>");
   AddAutoIPMirror("Current IP Check", "Current IP Address: ", "</body>");
   AddAutoIPMirror("75.126.37.2", "<title>", "</title>");
   //AddAutoIPMirror("IP address", "Your IP address is  <B> ", " </B>");
   //AddAutoIPMirror("http://www2.simflex.com/ip.shtml", "Your IP address is <BR>", "<BR>");
   
   // ----------------------------------------------------
   // Create the event
   // ----------------------------------------------------
   EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
   
   // ----------------------------------------------------
   // Show info in console
   // ----------------------------------------------------
   Console.WriteLine("Serverlist.cs: 2.0");
   
   // ----------------------------------------------------
   // Lets find internet ip
   // ----------------------------------------------------
   DetectInternetIP();
   
   
  }
  
  // ==================================================================================
  // Add a range of local lan ips
  // ==================================================================================
  private static void AddLocalLANIPRange(string RangeFrom, string RangeTo)
  {
   LocalLanIPRanges[LocalLanIPRangesCount] = new LocalLanIPRange();
   LocalLanIPRanges[LocalLanIPRangesCount].RangeFrom = StringIPToUInt32IP(RangeFrom);
   LocalLanIPRanges[LocalLanIPRangesCount].RangeTo = StringIPToUInt32IP(RangeTo);
   LocalLanIPRangesCount = LocalLanIPRangesCount + 1;
  }
  
  
  // ==================================================================================
  // Convert a ip string to a binary unsigned int
  // ==================================================================================
  private static UInt32 StringIPToUInt32IP(string addr)
  {
   byte[] byteArray1 = IPAddress.Parse(addr).GetAddressBytes();
   byte[] byteArray2 = IPAddress.Parse(addr).GetAddressBytes();
   byteArray1[0] = byteArray2[3];
   byteArray1[1] = byteArray2[2];
   byteArray1[2] = byteArray2[1];
   byteArray1[3] = byteArray2[0];
   return  BitConverter.ToUInt32( byteArray1, 0);
  }
  
  // ==================================================================================
  // Used to store the local lan ip ranges
  // ==================================================================================
  private class LocalLanIPRange
  {
   public UInt32   RangeFrom;
   public UInt32   RangeTo;
  } 

  // ==================================================================================
  // Add a AutoIP mirror
  // ==================================================================================
  private static void AddAutoIPMirror(string sURL, string sStart, string sEnd)
  {
   AutoIPMirrors[AutoIPMirrorsCount] = new AutoIPMirror();
   AutoIPMirrors[AutoIPMirrorsCount].sURL = sURL;
   AutoIPMirrors[AutoIPMirrorsCount].sStart = sStart;
   AutoIPMirrors[AutoIPMirrorsCount].sEnd = sEnd;
   AutoIPMirrorsCount = AutoIPMirrorsCount + 1;
  }

  // ==================================================================================
  // Used to store the Auto IP mirrors
  // ==================================================================================
  private class AutoIPMirror
  {
   public string   sURL;
   public string   sStart;
   public string   sEnd;
   public UInt32   iFailures;
  } 

  // ==================================================================================
  // Detect ip
  // ==================================================================================
  public static void DetectInternetIP()
  {
   // ----------------------------------------------------
   // Autodetect the Internet IP
   // ----------------------------------------------------
   if (InternetIPAutodetect) {
    DateTime UpdateTime = InternetIPAutodetectLast;
    UpdateTime = UpdateTime.AddMinutes(MinutesBetweenIPAutodetect);
    if (UpdateTime<DateTime.Now) {
     string NewAddress = null;
     NewAddress = FindInternetIP();
     InternetIPAutodetectLast = DateTime.Now;
     if (NewAddress!=null) 
     {
      Address = NewAddress;
     }
    }
   }
   
  }
  // ==================================================================================
  // The serverlist event
  // ==================================================================================
  public static void EventSink_ServerList( ServerListEventArgs e )
  {
   try
   {
    // ----------------------------------------------------
    // Lets find internet ip
    // ----------------------------------------------------
    DetectInternetIP();
    
    // ----------------------------------------------------
    // Find the server ip to use for this user
    // ----------------------------------------------------
    IPAddress ipAddr = FindMachineIP(e);
    
    // ----------------------------------------------------
    // Send serverlist
    // ----------------------------------------------------
    if (ipAddr != null)
    {
     e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
    } else {
     e.Rejected = true;
    }
   }
   catch
   {
    e.Rejected = true;
   }
  }
  
  
  // ==================================================================================
  // Connects to a webserver that gives you your internet ip
  // ==================================================================================
                public static string FindInternetIP( )
  {
   // ----------------------------------------------------
   // Pick a random mirror
   // ----------------------------------------------------
   Random rnd = new Random();
   int UseMirror = (int)( rnd.NextDouble() * AutoIPMirrorsCount);
   string MyIP = "";
   
   // ----------------------------------------------------
   // Catch if the mirror is down
   // ----------------------------------------------------
   try
   {
    // ----------------------------------------------------
    // Get the webpage
    // ----------------------------------------------------
               WebClient client = new WebClient();
               byte[] pageData = client.DownloadData(AutoIPMirrors[UseMirror].sURL);
               MyIP = System.Text.Encoding.ASCII.GetString(pageData);
              
    // ----------------------------------------------------
    // Find the string
    // ----------------------------------------------------
                         int iStart = MyIP.LastIndexOf(AutoIPMirrors[UseMirror].sStart);   
                         int iEnd = MyIP.IndexOf(AutoIPMirrors[UseMirror].sEnd, iStart+AutoIPMirrors[UseMirror].sStart.Length);
                         MyIP = MyIP.Substring(iStart+AutoIPMirrors[UseMirror].sStart.Length, iEnd-iStart-AutoIPMirrors[UseMirror].sStart.Length );
                         MyIP = MyIP.Trim();
                         
    // ----------------------------------------------------
    // Return value
    // ----------------------------------------------------
                         Console.WriteLine("Internet IP: {0} ({1})", MyIP, AutoIPMirrors[UseMirror].sURL);
                         return MyIP;
   }
   catch
   {
    Console.WriteLine("Unable to autoupdate the Internet IP from {0}!", AutoIPMirrors[UseMirror].sURL);
    Console.WriteLine("----------------------------------------------------------------------");
    Console.WriteLine(MyIP);
    Console.WriteLine("----------------------------------------------------------------------");
    return null;
   }
         }
  
  
  // ==================================================================================
  // Calculates what server IP to use
  // ==================================================================================
                public static IPAddress FindMachineIP( ServerListEventArgs e )
  {
   // ----------------------------------------------------
   // Find the IP of the connecting user
   // ----------------------------------------------------
   Socket sock = e.State.Socket;
   IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;    
   IPAddress serverAddress;
   // ----------------------------------------------------
   // Is it Loopback?
   // ----------------------------------------------------
   if ( IPAddress.IsLoopback( theirAddress ) )
   {
    return IPAddress.Parse( "127.0.0.1" );
   }
   // ----------------------------------------------------
   // Local
   // ----------------------------------------------------
   UInt32 uint32Address = StringIPToUInt32IP(theirAddress.ToString());
   for (UInt32 LocalLanIPRangesLoop = 0 ; LocalLanIPRangesLoop < LocalLanIPRangesCount; LocalLanIPRangesLoop++)
   { 
    if ( (LocalLanIPRanges[LocalLanIPRangesLoop].RangeFrom <= uint32Address) && (LocalLanIPRanges[LocalLanIPRangesLoop].RangeTo >= uint32Address) )
    {
     Resolve(Dns.GetHostName(), out serverAddress);
     
     Console.WriteLine("Player is reconnecting to " + serverAddress.ToString());
     return serverAddress;
    }
   }
   // ----------------------------------------------------
   // Internet addresses
   // ----------------------------------------------------
   if (Address!=null)
   {
    Resolve(Address, out serverAddress); 
   } else {
    Resolve(Dns.GetHostName(), out serverAddress); 
   }
   
   Console.WriteLine("Player is reconnecting to " + serverAddress.ToString());
   return serverAddress;
  }
  
  // ==================================================================================
  // Resolves dns names
  // ==================================================================================
  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;
  }
 }
}
__________________
cornude-: i wont duel for free for a few reasons and i will list them
Satan-TB: 1. you're a
pussy
Aaron Sithsong is offline   Reply With Quote
Old 03-04-2007, 03:59 AM   #9 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

The Auto Detect won't work for me lol, so I just manually set my IP.
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 04:15 AM   #10 (permalink)
Account Terminated
 
Join Date: Jan 2007
Location: In The Matrix (i am Neo :D)
Age: 16
Posts: 204
Send a message via MSN to AlexBF2142
Default

did you try asking jeff on connect uo forums, he will help you

have you made sure there arn't any silly little typing errors when you go and edit your server
AlexBF2142 is offline   Reply With Quote
Old 03-04-2007, 04:24 AM   #11 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

Just checked and have no typing/spelling errors that I can see. (Have double checked twice).
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 04:37 AM   #12 (permalink)
Account Terminated
 
Join Date: Jan 2007
Location: In The Matrix (i am Neo :D)
Age: 16
Posts: 204
Send a message via MSN to AlexBF2142
Default

well i remember when i added my shard connect uo worked fine, except for patching you need newest version of win rar to make the patch :-/
AlexBF2142 is offline   Reply With Quote
Old 03-04-2007, 04:38 AM   #13 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

My shard don't have patches. Can you do me a favor tho please someone? Try to connect to Kronic Animosity by using ConnectUO and tell me where it gets you please and thank you.
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 04:50 AM   #14 (permalink)
Forum Novice
 
nekron_14's Avatar
 
Join Date: Feb 2004
Location: Your closet
Age: 18
Posts: 613
Default

Thanks a million Alex, I'll get you with karma again (don't worry hehe).
__________________
Happier than Rosie O'Donnell in a titty bar - Larry the Cable Guy
nekron_14 is online now   Reply With Quote
Old 03-04-2007, 04:52 AM   #15 (permalink)
Account Terminated
 
Join Date: Jan 2007
Location: In The Matrix (i am Neo :D)
Age: 16
Posts: 204
Send a message via MSN to AlexBF2142
Default

seems to work a ok nice deco by the way
AlexBF2142 is offline   Reply With Quote
Old 03-04-2007, 10:40 AM   #16 (permalink)
Forum Novice
 
Join Date: Nov 2006
Posts: 335
Default

Quote:
Originally Posted by nekron_14 View Post
Thanks a million Alex, I'll get you with karma again (don't worry hehe).
Where's my karma? KIDDDING JUST KIDDING

On topic:

If you have trouble with the autodetect then im already wondering the possibilities.... Anyone agree?
__________________
cornude-: i wont duel for free for a few reasons and i will list them
Satan-TB: 1. you're a
pussy
Aaron Sithsong 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