RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Can't Connect

Wootie123

Sorceror
Log in and create an account for the person trying to login to see if that helps
is this your ip? 169.254.43.194:2593
Also in your router settings, you added your custom server name with the port?
i'll try that. and in router settings on the port forward page i just have it set to "UO" than the port. not my server name
 

Soteric

Knight
I mean probably the person has firewall or some other issues on his side. For example his firewall is blocking the whole client app or outgoing connections to port 2593. Is he able to connect to any other shards? Could he telnet them at least?
 

Wootie123

Sorceror
I mean probably the person has firewall or some other issues on his side. For example his firewall is blocking the whole client app or outgoing connections to port 2593. Is he able to connect to any other shards? Could he telnet them at least?
I can't connect to the IP on the same computer that i can connect to using my local IP. If i try to log in on a other computer i can't log in at all. For some reason i can't connect using my IP. unless its local. =/
 

Wootie123

Sorceror
nobody has an answer? i've ran/built many servers, this one was me and my wifes and i just can't connect using my ip.
 

Stuart lil

Sorceror
Im having the EXACT same issue! Also note that the IP you put into your serverlist.cs does NOT appear as "Listening" in your RunUO console.. Happens to me to.. and im just like you completely out of ideas...

In my case its one step more annoying.. cause when my console invokes the serverlist.cs to ideantify my ip automaticly it actually finds it, but evenso it insists on using my local adresses only and there is no way for me to change it =/
 

Wootie123

Sorceror
Im having the EXACT same issue! Also note that the IP you put into your serverlist.cs does NOT appear as "Listening" in your RunUO console.. Happens to me to.. and im just like you completely out of ideas...

In my case its one step more annoying.. cause when my console invokes the serverlist.cs to ideantify my ip automaticly it actually finds it, but evenso it insists on using my local adresses only and there is no way for me to change it =/

After awhile i gave up. Just tried it again and still have the same issue. I looked it up and still have no idea what's wrong. canyouseeme connects everytime i try my port but for some reason i just can't connect using my ip. My guess is maybe my client is patched too high? I then thought maybe it was my router again. checked everything even added port triggers. going up and down adding UO/runuo ports. Still the same result. I now have no idea and wish this could of been fixed. I've never had this issue with hosting a server.
 

mjw1203

Sorceror
I am having the same problem :( In the old says there was a servrlist mod someone had made 4-5 years ago that fixed this problem
 

ShamaN_br

Sorceror
I have the exact same problem.

Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...done (0 errors, 0 w
Scripts: Skipping VB.NET Scripts...done (use -vb to
Scripts: Verifying...done (2841 items, 594 mobiles)
Regions: Loading...done
World: Loading...done (51753 items, 1200 mobiles) (
Restricting client version to 7.0.22.0. Action to b
Listening: 192.168.1.66:2593
Listening: 192.168.1.64:2593
Listening: 127.0.0.1:2593
Client: 200.xxxx: Connected. [1 Online]
Client: 200.xxx: Disconnected. [0 Online]
Client: 200.xxxx:x Connected. [1 Online]
Client: 200.xxxx: Disconnected. [0 Online]
Client: 200.xxxx: Connected. [1 Online]
Client: 200.xxxx: Disconnected. [0 Online]
Core: Using dual save strategy
World: Saving...Closing Save Files.
Save done in 0.30 seconds.
Client: xxxxxx: Connected. [1 Online]
Client: xxxxxxx: Disconnected. [0 Online]
Core: Using dual save strategy
World: Saving...Closing Save Files.
Save done in 0.09 seconds.

Success: I can see your service on 200xxxxx on port (2593)
Your ISP is not blocking port 2593
 

LocoDino

Sorceror
I just downloaded and installed the current version of RunUO. I have set port forwarding on my router to the proper address and settings. People can connect and their accounts validate, but I noticed that after the disconnect occurs the server is supposed to move you to the character selection screen. This doesn't happen unless I am connected on the local network. Instead I get a timeout error, or that the game is not responding. I am not familiar enough with the scripts or coding to understand what's happening. I do feel that the issue is beyond ServerList.cs. I just do not know where to go after that.
 

ShamaN_br

Sorceror
using System;
using System.IO;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/*
* The default setting for Address, a value of 'null', will use your local IP address. If all of your local IP addresses
* are private network addresses and AutoDetect is 'true' then RunUO will attempt to discover your public IP address
* for you automatically.
*
* If you do not plan on allowing clients outside of your LAN to connect, you can set AutoDetect to 'false' and leave
* Address set to 'null'.
*
* If your public IP address cannot be determined, you must change the value of Address to your public IP address
* manually to allow clients outside of your LAN to connect to your server. Address can be either an IP address or
* a hostname that will be resolved when RunUO starts.
*
* If you want players outside your LAN to be able to connect to your server and you are behind a router, you must also
* forward TCP port 2593 to your private IP address. The procedure for doing this varies by manufacturer but generally
* involves configuration of the router through your web browser.
*
* ServerList will direct connecting clients depending on both the address they are connecting from and the address and
* port they are connecting to. If it is determined that both ends of a connection are private IP addresses, ServerList
* will direct the client to the local private IP address. If a client is connecting to a local public IP address, they
* will be directed to whichever address and port they initially connected to. This allows multihomed servers to function
* properly and fully supports listening on multiple ports. If a client with a public IP address is connecting to a
* locally private address, the server will direct the client to either the AutoDetected IP address or the manually entered
* IP address or hostname, whichever is applicable. Loopback clients will be directed to loopback.
*
* If you would like to listen on additional ports (i.e. 22, 23, 80, for clients behind highly restrictive egress
* firewalls) or specific IP adddresses you can do so by modifying the file SocketOptions.cs found in this directory.
*/

public static readonly string Address ="uobr.servegame.com";
public static readonly string ServerName = "Ultima Online";

public static readonly bool AutoDetect = true;

public static void Initialize()

{
if ( Address == null ) {
if ( AutoDetect )
AutoDetection();
}
else {
Resolve( Address, out m_PublicAddress );
}

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

private static IPAddress m_PublicAddress;

private static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
NetState ns = e.State;
Socket s = ns.Socket;

IPEndPoint ipep = (IPEndPoint)s.LocalEndPoint;

IPAddress localAddress = ipep.Address;
int localPort = ipep.Port;

if ( IsPrivateNetwork( localAddress ) ) {
ipep = (IPEndPoint)s.RemoteEndPoint;
if ( !IsPrivateNetwork( ipep.Address ) && m_PublicAddress != null )
localAddress = m_PublicAddress;
}

e.AddServer( ServerName, new IPEndPoint( localAddress, localPort ) );
}
catch
{
e.Rejected = true;
}
}

private static void AutoDetection()
{
if ( !HasPublicIPAddress() ) {
Console.Write( "ServerList: Auto-detecting public IP address..." );
m_PublicAddress = FindPublicAddress();

if ( m_PublicAddress != null )
Console.WriteLine( "done ({0})", m_PublicAddress.ToString() );
else
Console.WriteLine( "failed" );
}
}

private static void Resolve( string addr, out IPAddress outValue )
{
if ( IPAddress.TryParse( addr, out outValue ) )
return;

try {
IPHostEntry iphe = Dns.GetHostEntry( addr );

if ( iphe.AddressList.Length > 0 )
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
}
catch {
}
}

private static bool HasPublicIPAddress()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();

foreach ( NetworkInterface adapter in adapters ) {
IPInterfaceProperties properties = adapter.GetIPProperties();

foreach ( IPAddressInformation unicast in properties.UnicastAddresses ) {
IPAddress ip = unicast.Address;

if ( !IPAddress.IsLoopback( ip ) && ip.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork( ip ) )
return true;
}
}

return false;


/*
IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );

IPAddress[] ips = iphe.AddressList;

for ( int i = 0; i < ips.Length; ++i )
{
if ( ips.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork( ips ) )
return true;
}

return false;
*/
}

private static bool IsPrivateNetwork( IPAddress ip )
{
// 10.0.0.0/8
// 172.16.0.0/12
// 192.168.0.0/16

if ( ip.AddressFamily == AddressFamily.InterNetworkV6 )
return false;

if ( Utility.IPMatch( "192.168.*", ip ) )
return true;
else if ( Utility.IPMatch( "10.*", ip ) )
return true;
else if ( Utility.IPMatch( "172.16-31.*", ip ) )
return true;
else
return false;
}

private static IPAddress FindPublicAddress()
{
try {
WebRequest req = HttpWebRequest.Create( "http://www.runuo.com/ip.php" );
req.Timeout = 15000;

WebResponse res = req.GetResponse();

Stream s = res.GetResponseStream();

StreamReader sr = new StreamReader( s );

IPAddress ip = IPAddress.Parse( sr.ReadLine() );

sr.Close();
s.Close();
res.Close();

return ip;
} catch {
return null;
}
}
}
}
 

LocoDino

Sorceror
* If you would like to listen on additional ports (i.e. 22, 23, 80, for clients behind highly restrictive egress
* firewalls) or specific IP adddresses you can do so by modifying the file SocketOptions.cs found in this directory.
*/
I did this as well. Still same result. I can play locally, but nobody can get to character select screen when logging in from the outside. To eliminate client issue I took my PC ran it through internet on my phone and tried to connect from the outside. Same issue as outside users. The console shows the login, then disconnects. During the console update the client never makes it to character creation or selection screens.
If it was a closed port or the server wasn't being reached I do not think we would get to the server selection screen.


public static readonly string Address ="my.public.ip.here a.k.a. whatismyip.com result";
public static readonly string ServerName = "My Server Name";

Tried these options below:
public static readonly bool AutoDetect = true;
public static readonly bool AutoDetect = false;
 

LocoDino

Sorceror
Ok to narrow things down even more... I tried to connect remotely through my phone, while it was on the spinning wheel of death, I plugged in my network cable to reconnect to my local network. Almost instantly I was at the character selection screen. Does this mean that the server is not detecting public clients, and that even thought the clients are coming from the outside it keeps wanting to treat them as local clients? I wish I knew more about this stuff.
 

LocoDino

Sorceror
I got it to work... finally... I am reverting many of my changes to my main build to see which one fixed it. If what I did to fix it fixes it for sure I'll post the fix here to see if it helps you all after I am done kicking myself for not doing this sooner...
 

LocoDino

Sorceror
My fix worked for me... I feel kinda silly so hopefully this works for you and we all feel silly together!

I'll start from the top. I was having the same issue as many of you were and I scoured the internets to try many different options and flavors. I even tried changing 3 files at least 10 times each with no results. Here is what ultimately fixed tis issue for me. Below is my working Serverlist.cs file, but that's not the only thing I needed to do. Go into your RunUO directory where the RunUO.exe file is. Once there right click the file, go into properties and set this file to "Run As Administrator" don't apply yet! Under that setting there is a box for "Change setting for all users" Click that and make sure you run this executable as admin for ALL users... Done... If this works for you feel free to give yourself or me the implied double facepalm. I know I did... ;)


using System;

using System.IO;

using System.Net;

using System.Net.NetworkInformation;

using System.Net.Sockets;

using Server;

using Server.Network;

namespace Server.Misc



{


publicclassServerList



{


/*




* The default setting for Address, a value of 'null', will use your local IP address. If all of your local IP addresses

* are private network addresses and AutoDetect is 'true' then RunUO will attempt to discover your public IP address

* for you automatically.

*

* If you do not plan on allowing clients outside of your LAN to connect, you can set AutoDetect to 'false' and leave

* Address set to 'null'.

*

* If your public IP address cannot be determined, you must change the value of Address to your public IP address

* manually to allow clients outside of your LAN to connect to your server. Address can be either an IP address or

* a hostname that will be resolved when RunUO starts.

*

* If you want players outside your LAN to be able to connect to your server and you are behind a router, you must also

* forward TCP port 2593 to your private IP address. The procedure for doing this varies by manufacturer but generally

* involves configuration of the router through your web browser.

*

* ServerList will direct connecting clients depending on both the address they are connecting from and the address and

* port they are connecting to. If it is determined that both ends of a connection are private IP addresses, ServerList

* will direct the client to the local private IP address. If a client is connecting to a local public IP address, they

* will be directed to whichever address and port they initially connected to. This allows multihomed servers to function

* properly and fully supports listening on multiple ports. If a client with a public IP address is connecting to a

* locally private address, the server will direct the client to either the AutoDetected IP address or the manually entered

* IP address or hostname, whichever is applicable. Loopback clients will be directed to loopback.

*

* If you would like to listen on additional ports (i.e. 22, 23, 80, for clients behind highly restrictive egress

* firewalls) or specific IP adddresses you can do so by modifying the file SocketOptions.cs found in this directory.

*/




publicstaticreadonlystring Address = "go to whatismyIP.com and put that address in here";

publicstaticreadonlystring ServerName = "Run UO Test Server";

publicstaticreadonlybool AutoDetect = false; // We are feeding this value ourselves now

publicstaticvoid Initialize()



{


if ( Address == null ) {

if ( AutoDetect )



AutoDetection();

}


else {

Resolve( Address, out m_PublicAddress );



}


EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );



}


privatestatic IPAddress m_PublicAddress;

privatestaticvoid EventSink_ServerList( ServerListEventArgs e )



{


try



{

NetState ns = e.State;

Socket s = ns.Socket;

IPEndPoint ipep = (IPEndPoint)s.LocalEndPoint;

IPAddress localAddress = ipep.Address;


int localPort = ipep.Port;

if ( IsPrivateNetwork( localAddress ) ) {



ipep = (IPEndPoint)s.RemoteEndPoint;


if ( !IsPrivateNetwork( ipep.Address ) && m_PublicAddress != null )



localAddress = m_PublicAddress;

}


e.AddServer( ServerName, new IPEndPoint( localAddress, localPort ) );



}


catch



{


e.Rejected = true;



}

}


privatestaticvoid AutoDetection()



{


if ( !HasPublicIPAddress() ) {

Console.Write( "ServerList: Auto-detecting public IP address..." );



m_PublicAddress = FindPublicAddress();


if ( m_PublicAddress != null )

Console.WriteLine( "done ({0})", m_PublicAddress.ToString() );

else

Console.WriteLine( "failed" );



}

}


privatestaticvoid Resolve( string addr, out IPAddress outValue )



{


if ( IPAddress.TryParse( addr, out outValue ) )

return;

try {



IPHostEntry iphe = Dns.GetHostEntry( addr );


if ( iphe.AddressList.Length > 0 )



outValue = iphe.AddressList[iphe.AddressList.Length - 1];

}


catch {



}

}


privatestaticbool HasPublicIPAddress()



{

NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();


foreach ( NetworkInterface adapter in adapters ) {



IPInterfaceProperties properties = adapter.GetIPProperties();


foreach ( IPAddressInformation unicast in properties.UnicastAddresses ) {



IPAddress ip = unicast.Address;


if ( !IPAddress.IsLoopback( ip ) && ip.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork( ip ) )

returntrue;



}

}


returnfalse;



 


/*




IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );







IPAddress[] ips = iphe.AddressList;







for ( int i = 0; i < ips.Length; ++i )

{

if ( ips.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork( ips ) )

return true;

}







return false;

*/



}


privatestaticbool IsPrivateNetwork( IPAddress ip )



{


// 10.0.0.0/8

// 172.16.0.0/12

// 192.168.0.0/16

if ( ip.AddressFamily == AddressFamily.InterNetworkV6 )

returnfalse;

if ( Utility.IPMatch( "192.168.*", ip ) )



{


Console.Write( "Detected a 192.168 IP address" );

returntrue;



}


elseif ( Utility.IPMatch( "10.*", ip ) )



{


Console.Write( "Detected a 10. IP address" );

returntrue;



}


elseif ( Utility.IPMatch( "172.16-31.*", ip ) )



{


Console.Write( "Detected a 172.16-31 IP Address" );

returntrue;



}


else



{


Console.Write("IP Address is from remote connection");

returnfalse;



}

}


privatestatic IPAddress FindPublicAddress()



{


try {

WebRequest req = HttpWebRequest.Create( "http://www.runuo.com/ip.php" );



req.Timeout = 15000;

WebResponse res = req.GetResponse();


Stream s = res.GetResponseStream();

StreamReader sr = newStreamReader( s );



IPAddress ip = IPAddress.Parse( sr.ReadLine() );

sr.Close();

s.Close();

res.Close();


return ip;

} catch {

returnnull;



}

}

}

}



 

ShamaN_br

Sorceror
i've done what you told, but I'm still stuck at the verifying account screen... my runuo screen says Connected 1 online, then it disconnects for taking no action from there on. :(
 

LocoDino

Sorceror
See what gets me is if you watch a successful connection, it does disconnect you anyway even when it works. It makes this obviously very tricky to troubleshoot. I wouldn't spend so much time on the ServerList.cs. I would check your file security on the server folders. I'm no expert, all I can do is give the advice that helped me get around the issue. After getting everything working I have been able to make it work on old and new server builds that did not work before as well. So this isn't just "Oh I got it working." I had an older setup of server files, and the most recent version. I took the older version and got that working first, and then applied what made the older versions to the newer version and those started working as well. I am now running a fresh install of RunUO 2.4 with Nuren Spawner scripts package in place. I wish I could do more to help you.
 

ShamaN_br

Sorceror
Hey guys, thank you so much, is working fine for me now... Players are able to login normally, I'm not able to login on my public IP but I cna load from local... THan its fine; :D
 
Top