|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Jun 2004
Posts: 81
|
Ok, I seem to be having some connection problems. I've already gone through all the steps here http://www.runuo.com/documentation.php which consists of editing my serverlist.cs to my IP which was found from the link within. I have also opened port 2593 (yes, i finally got it working for those of you who saw my other post). It seems I can connect within the network using my internal IP but when I give people my IP (both my internal and the one that is set in serverlist.cs) they cannot connect. I have even set myself DMZ and they still can't connect!! Any help would be greatly appreciated
--Thank You |
|
|
|
|
|
#2 (permalink) | |
|
Account Terminated
|
Quote:
Post your serverlist.cs and forward the port ( its really simple, same as dmz just on one port ). |
|
|
|
|
|
|
#3 (permalink) | |
|
Newbie
Join Date: Jun 2004
Posts: 81
|
Quote:
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 = "68.189.67.114"; public const string ServerName = "Heftiger's Uber 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; } } } |
|
|
|
|
|
|
#5 (permalink) | |
|
Newbie
Join Date: Jun 2004
Posts: 81
|
Quote:
Also, in the memo for routers is says somethign about "privite const string address", do I need to change my public to private? Or is that a typo? |
|
|
|
|
|
|
#6 (permalink) |
|
Join Date: Jun 2004
Age: 29
Posts: 10
|
This solution worked for me. I run my server on a machine burried deep in my local network..
first add this line to your ServerList.cs Code:
public const string LocalServerAddress = "put internal ip address here"; Code:
public const string Address = "external ip address"; Note that when the server is started you will only see the localhost ip of 127.0.0.1 and the internal ip address. You can use this nice small and freeware port mapper if your server is in the network behind another machine. If it is behind a router then you'll have to seek for another solution. Last time I tried to run the server hehind a router I had no luck. Did away with that whole setup and built a file server machine that acts as a router also. AnalogX Portmapper Dont forget to disable the built in firewall that windows xp is always determined to use, if Xp is your os of choice. If you choose to leave this running then you will need to set port forwarding for the primary network adapter on your server machine to allow the needed port to be open for each ip address. Your localhost, internal and external. Otherwise the dataflow fromt the server to client will get interupted by the firewall. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|