|
||
|
|||||||
| 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: Apr 2006
Posts: 3
|
Okay, I've tried almost everything in the forums to see about people connecting to my shard (it's not public, just a shard i have myself, and I want my friend to help me build it.) I've tried going into my router and doing a "port forward" thing, and i did it exactly as i understand it, but no dice. I'm using a U.S robotics MAXg router, and this is the info i have after port forwarding...
Port ForwardingOn Protocol WAN Ports LAN IP Address LAN Ports TCP 2592 to 2954 192.168.2.1 2592 to 2954 This is, what i assume, the right way... but maybe not. my IP address is 70.152.236.128 <-- this is my real IP address, retrieved from www.whatsmyip.org. my router hides it behind an address of 192.168.2.3 (the "IP address") and.. 255.255.255.0 (the subnet mask) and the 192.168.2.1 the (default gateway) i've edited my serverlist.cs best i can, and its #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"; */ private const string Address = "70.152.236.128"; public const string ServerName = "Stephen's Shard!"; 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; } } } /code any takers to help me out? |
|
|
|
|
|
#2 (permalink) | ||
|
Newbie
Join Date: Jun 2006
Posts: 99
|
Quote:
Quote:
EDIT: from what I can read 192.168.2.3 is the private IP address of the RunUO machine
__________________
Opinions are like assholes, everybody has em and they all stink. |
||
|
|
|
|
|
#3 (permalink) |
|
Join Date: Apr 2006
Posts: 3
|
I think i wasn't clear enough, i didn't mean that i wanted my friend who i knew PERSONALLY to connect, that would be a LAN (easy) but it's somebody from somewhere else in the State's, so they cannot connect to my server. the things you told me to change would have it set up to connect as a LAN. how can my friend from somewhere else connect, then? what should i modify?
|
|
|
|
|
|
#4 (permalink) |
|
Newbie
Join Date: Jun 2006
Posts: 99
|
Ok, for me to solve your problem, I need more information, because you just confused me
- You're friend; is he connected on your personal LAN? - Is he physicly connected (lan cable/wireless across houses) or is he connected via a VPN? - what IP address does your friend have? What I assume (despite your further elaboration) is that your friend will connect the same way as the other person in the states, namely via 70.152.236.128. If this is the case (and actually, regardless, even if your friend will connect on the LAN), the following will 100% work if implemented correctly: 1) do your portforwarding from your public IP (70.152.236.128) to your RunUO machine (192.168.2.3) on ports 2592 to 2954 both TCP and UDP (to be extra sure, and this should be possible on any decent router). 2) use "private const string Address = null;" in serverlist.cs so RunUO will bind to any and all IP addresses your machine has. In this case, both your friend (via LAN) and the other person (via Internet) can connect to your shard.
__________________
Opinions are like assholes, everybody has em and they all stink. |
|
|
|
|
|
#5 (permalink) |
|
Join Date: Apr 2006
Posts: 3
|
okay, my friend is now out of the picture. (hopin to clear it up). the only person that wants to connect now, is my friend from Wisconsin. so.. from what i've heard so far.. I should portfoward ports 2592 to 2594, to the runuo machine (192.168.2.3), on both TCP and UDP? and change the serverlist.cs to null.. and it should work? or am i missing something? also, when telling them what to put into their "create local server" thing, what should they put in for the IP part? i realize they should put in 2593 for the port.. what else?
|
|
|
|
|
|
#6 (permalink) |
|
Newbie
Join Date: Jun 2006
Posts: 99
|
Everthing ok except one thing
port 2592 to 2954 is a range of ports to be forwarded any port from 2592 until 2954 will be forwarded to the RunUO machine (to the exact same ports, 2592 until 2954). I think RunUO only needs one port to be forwarded though
__________________
Opinions are like assholes, everybody has em and they all stink. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|