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 05-17-2006, 03:02 AM   #1 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default sever list help

my ip address isnt working on my severlist or my dns name isnt working and my firewall is down can anyone help me please
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 03:50 AM   #2 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

You could start by posting your ServerList.cs file so we know exactly how you've got it set up.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 03:57 AM   #3 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default ok my serverlist that i need help on

ok thanks i well and it not letting sign on to my sever when i put my dns name or my ip name and my firewall is down too here is my serverlist




// ================================================== ================================================
// 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 www.whatismyip.com.
// 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 www.whatismyip.com 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 = "servername";

// ================================================== ================================
// 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 = 1440;
public static string Address = null;

// ================================================== ================================
// 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("http://www.findmyip.com/", "Your IP address is:<br>", "</FONT>");
AddAutoIPMirror("http://www.ipaddy.com/", "Your IP address is: ", "<br>");
AddAutoIPMirror("http://checkip.dyndns.org/", "Current IP Address: ", "</body>");
AddAutoIPMirror("http://ipid.shat.net/iponly/", "<title>", "</title>");
AddAutoIPMirror("http://www.edpsciences.com/htbin/ipaddress", "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;
}

}
}

Last edited by Dark Magican Girl; 05-17-2006 at 04:08 AM.
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 04:13 AM   #4 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Okay, so you're using Fixit's ServerList, so technically it should be foolproof.

Next question, does your connection go through a router?
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 04:22 AM   #5 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Quote:
Originally Posted by Dark Magican Girl via PM
yes i have a rotour
There's really no need to send me private messages. We're not discussing anything secretive. :P

When your shard is behind a router, you need to enable forwarding of the appropriate port (in RunUO's case, 2593) from your router to the PC running your shard. The instructions for this are different depending on what brand and model of router you have, so unfortunately I doubt I'll be able to give you specific instructions.

Best I can suggest is to consult the manual for your router, and look up port forwarding. You'll need to know the local IP address of the computer running the shard as well, to know where to forward the port to.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 04:28 AM   #6 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default ok

ok my friend give me this router but i can tell u my router maybe u might know it is linksys and the model is befsr41
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 04:42 AM   #7 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

I suggest you try searching for instructions on www.portforward.com for your specific router.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 06:03 AM   #8 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default ok

it doesnt tell me how to forward it i am so confushed on what i am doing i have no clue what i am doing i can get on my shard with this 192.168.1.101 and this 127.0.0.1 and i went to c:/command ipconfig thing and it is telling me this is my ip address 192.168.1.101 and my ip address changes all the time damn i do wish my ip address can just stay one not to change all the time that is all i need to do and my friends said i need to config my dmz on my routor and i did that with my ip address i am confushed
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 06:12 AM   #9 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Setting up a DMZ is basically forwarding ALL the ports from your router to a particular local IP address. That would technically accomplish the same goal, though it presents more of a security risk if your computer is not completely secure.

PortForward.com has three different guides for your model number, depending on which revision of the hardware/firmware yours has. You can have a look at all three and see which one accurately represents the look of your router's configuration screens.

http://www.portforward.com/english/r....2/default.htm
http://www.portforward.com/english/r...v2/default.htm
http://www.portforward.com/english/r...v5/default.htm

Since ipconfig says your IP is 192.168.1.101, that's the IP you need to forward the port to (or configure your DMZ for, if you choose that option). Its not your "real" IP address, its just the one your router uses to identify your computer. Your router would have two IP addresses, its private one, and its public one. The router's private IP is probably 192.168.1.1 (or whatever IP you need to use to access its settings), and the public one would be the address that players will need to connect to in order to access your shard.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...

Last edited by Thraxus; 05-17-2006 at 06:15 AM.
Thraxus is offline   Reply With Quote
Old 05-17-2006, 06:26 AM   #10 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default ok

hey do u have any messagers beacse i am lost maybe me and u can talked on them
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 06:33 AM   #11 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

That wouldn't do any good. You're the only one that can see your router's configuration. If the instructions and screenshots from those links I posted aren't helping you, then there wouldn't be any more I could do to make it more clear.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 06:38 AM   #12 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default ok

ok what is a internet ip
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 06:47 AM   #13 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

I would assume "internet ip" refers to your public IP address, the one that people would utilize to access your shard once everything is set up. There should be a section in your router's configuration that displays your current public IP (possibly labeled as the "WAN IP"). If you can't find that and need to know what it is, you could visit http://whatismyipaddress.com/
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 06:51 AM   #14 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default

ok where do i setup my ip address up in my rotour config or in my mr fixit severlist
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 06:53 AM   #15 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Mr.Fixit's ServerList.cs should be able to handle all of that on its own. It will autodetect your IP address using one of several websites that provide that information when visisted. In all likelyhood, the only thing missing is the necessary port forwarding.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 06:53 AM   #16 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default

this is what it says when i start my sever up

RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.net scripts...no files found.
Scripts: Verifying...done (1658 items, 435 mobiles)
World: Loading...done (87871 items, 2352 mobiles) (2.0 seconds)
Serverlist.cs: 2.0
Internet IP: 71.129.40.149 (http://www.edpsciences.com/htbin/ipaddress)
Reports: Loading...done
Regions: Loading...done
Address: 127.0.0.1:2593
Address: 192.168.1.101:2593
World: Saving...done in 0.4 seconds.
World: Saving...done in 0.3 seconds.
World: Saving...done in 0.3 seconds.
World: Saving...done in 0.3 seconds.
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 06:59 AM   #17 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default

ok witch one do i port forward the 101 or the 149
Dark Magican Girl is offline   Reply With Quote
Old 05-17-2006, 02:07 PM   #18 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

The port forwarding needs to be pointed at the 192.168.1.101 address.

Basically, people will connect to 71.129.40.149 to reach your shard. The connection will hit your router, since that's your router's public IP address, and the connection will be made on port 2593. In order for them to actually reach your shard, the router just needs to know what address on your local network to send the shard-related traffic to. So you create a port forward for port 2593, going to 192.168.1.101.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 05-17-2006, 02:57 PM   #19 (permalink)
 
Join Date: May 2006
Age: 29
Posts: 15
Default

yay thanks i got it u are awsome help
Dark Magican Girl 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