|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
i am running the latest uo client patch dunno if that is the problem i disabled my fire wall i am running through a router please help on the server screen when i loginto uo it says conection blocked by firewall.
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 = "192.168.0.133"; * * If you need to resolve a DNS host name, you can do that too: * private const string Address = "your_dns_server_goes_here"; */ public const string Address = "81.134.115.17"; public const string ServerName = "ZeroServ"; 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) |
|
Moderate
Join Date: Nov 2002
Location: USA
Posts: 6,598
|
Your ServerList looks ok, did you forward port 2593 on the router to the local server ip? And, what ip address are you using to connect?
__________________
David Forum Moderator The RunUO.com Forum Moderator Team Forum Rules and Guidelines RunUO Forum Search Engine Download RunUO 2.0 RC2 |
|
|
|
|
|
#3 (permalink) |
|
I know how ya feel lol. Yes, forward port 2593... i actually freed up port 2592-2594. If that doesnt work, try this:
Where is says: [code:1]* The default setting, a value of 'null', will attempt to detect your IP address automatically: * private const string Address = "null"; [/code:1] make it: [code:1]* The default setting, a value of 'null', will attempt to detect your IP address automatically: * private const string Address = "YOUR IP HERE!!!"; [/code:1] Put your IP adress in where it says "YOUR IP HERE!!!" ... yeah. Should work... did for me. ~Moocow |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|