|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Nov 2004
Age: 22
Posts: 9
|
I know this topic is old, moldy, and worn out (ive searched the forums and read all the topics on it), but i cant seem to get this to work. I cant get others to be able to connect to my test server, though i can connect to it myself. Ive enabled port forwarding on my router, turned off my firewall, put my static ip in serverlist.cs, and i dont know what else to do. I have DSL through Bellsouth using a Westell Wirespeed model 2200 modem. The modem hooks to a basic network hub then directly to my computer. port forwarding is enabled for port 2593, and here is 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 const string Address = "70.145.22.254";
public const string ServerName = "Matts Test 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;
}
}
}
![]() |
|
|
|
|
|
#2 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
|
|
#6 (permalink) | |
|
Account Terminated
|
Quote:
|
|
|
|
|
|
|
#14 (permalink) |
|
Join Date: Nov 2004
Age: 22
Posts: 9
|
the white screenshot displays the port forwarding, click it to bring up a bigger image of it for details. the ip for the modem, which i assume is the external ip, is static, yes. honestly, i dont know anything about NETBIOS names so i dont know if they work for my router or not. the computer is operating with ip 192.168.1.97, the router has a static ip of 70.145.22.254 (which is the one in the serverlist script). ive even tried using ip passthrough which assigned this computer directly to the same ip as the router, to no result. If it would be easier to contact me, my yahoo messenger nickname is Gareth_Lore and my msn is Gareth_Lore@hotmail.com so i can be contacted on either messenger program.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|