Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 11-21-2007, 07:27 PM   #1 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default I need help with ServerList.sc

I entered my IP address since I have a router, but when RunUO starts up it still lists my local IP in the router. What am I doing wrong?
Omen99 is offline   Reply With Quote
Old 11-22-2007, 04:05 AM   #2 (permalink)
Forum Novice
 
FingersMcSteal's Avatar
 
Join Date: Mar 2006
Location: North East, England, UK
Posts: 865
Send a message via ICQ to FingersMcSteal Send a message via MSN to FingersMcSteal
Default

A bit more detail ? Internet IP, local LAN IP ?? Want people outside to be able to connect, just you locally to connect ???
__________________
We can be found on joinUO.com or listUO.com, come try us out.
FingersMcSteal is offline   Reply With Quote
Old 11-22-2007, 09:10 AM   #3 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default

I want anyone to be able to connect. So I put in my internet ip. I will show you...I'm sorry if I sounded like a complete noob. I would like to be helpful to others in the long run...Anyway, even though I have "wolvesbane.no-ip.org" in the IP spot, it still says:

Address: 127.0.0.1:2593
Address: 192.168.1.44:2593


Here is my ServerList.sc

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 = "wolvesbane.no-ip.org";

public const string ServerName = "Wolvesbane";

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;
}
}
}
Omen99 is offline   Reply With Quote
Old 11-22-2007, 04:12 PM   #4 (permalink)
Forum Novice
 
FingersMcSteal's Avatar
 
Join Date: Mar 2006
Location: North East, England, UK
Posts: 865
Send a message via ICQ to FingersMcSteal Send a message via MSN to FingersMcSteal
Default

That seems ok to me, the next step you'll need to try is allowing your router/modem to let network traffic get through the same port the server uses, thats known as port forwarding.

Do a search on this forum, theres a couple of good tutorials explaining what you need to do next.
__________________
We can be found on joinUO.com or listUO.com, come try us out.
FingersMcSteal is offline   Reply With Quote
Old 11-23-2007, 08:20 AM   #5 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default

But shouldn't my IP on my server screen read the correct IP address?
Omen99 is offline   Reply With Quote
Old 11-23-2007, 01:22 PM   #6 (permalink)
Forum Expert
 
Asmir3's Avatar
 
Join Date: Sep 2005
Location: A-Town Baby
Age: 19
Posts: 620
Default

Quote:
Originally Posted by Omen99 View Post
But shouldn't my IP on my server screen read the correct IP address?
If u dont forward ur port right it will not read it right.

btw wat kind of Internet provider u have?
__________________

Now open - uo15.net - The best in Publish 15 emulation
Asmir3 is offline   Reply With Quote
Old 11-23-2007, 05:28 PM   #7 (permalink)
Newbie
 
zenroth's Avatar
 
Join Date: Jan 2005
Age: 26
Posts: 90
Default

Your server will always show the same IP as if you opened a dos window and ran the command ipconfig. If you are behind a NAT router, you will want to do as others have said, and forward the server port to the IP the server is at (the local one, most likely 192.168.1.x) you will also want to open up TCP/IP on the server, and assign yourself a fixed local IP otherwise it may change and your port forwarding will break.

In addition to this, you will need to allow traffic on this port in any firewalls you are using.
zenroth is offline   Reply With Quote
Old 11-24-2007, 11:15 AM   #8 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default

I have Verizon DSL with a wireless router they provided me. This router is harder than any other I've seen. I will search the forum for port forwarding info. I went HERE to see if my port was open and it says it is, but I still can't connect. Any Ideas?

Last edited by Omen99; 11-24-2007 at 11:34 AM.
Omen99 is offline   Reply With Quote
Old 11-24-2007, 12:56 PM   #9 (permalink)
Newbie
 
Rapitharian's Avatar
 
Join Date: Aug 2006
Posts: 12
Default Router

If that says the port is open to the outside world it is accessable.
I tested it and you will find I was able to login.
I created an account called TestAcct. Player name Vargarven.

I suspect you are trying to connect to your server from the inside your network. You should be connecting to "192.168.1.44" not the public name or IP address.
The second thing I would check is the following. when you try to login does it hang at verifying?
If it does, you need a program to remove the client encryption such as; ConnectUO or Razor.

I will PM you the Pass word for the account I created.

Good luck,
-Rap
Rapitharian is offline   Reply With Quote
Old 11-24-2007, 01:03 PM   #10 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default

I can now login, but once I pick the server, I hang on the connecting... screen. Any suggestions now? thanks again for all the help
Omen99 is offline   Reply With Quote
Old 11-24-2007, 01:44 PM   #11 (permalink)
Newbie
 
Join Date: Jan 2004
Posts: 42
Default

Just FYI for everyone, I found my problem with connecting. I was using Razor 1.0.3 instead of 1.0.5, now I'm fine...gonna work on my server for a bit, then I would like everyone to check it out after awhile. Thanks guys
Omen99 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