So.. I have recently made a new shard (as I stated) . and someone is trying to log into it. and they cant seem to. So I was reading stuff online, because I have forgotten how to make a server public. And it said to go into "scripts" and then "misc" and then "serverlist" and put your IP in here... public static readonly string Address = null; . but I'm not sure if this is correct. also, I tried to rename my shard by replacing the line "My Shard" with the name.. any help?! please :)
 
You can change the name and the ip to a static one (but you can also use the default autodetection) inside the Server.cfg in your Config folder.

If they cant connect it would probably be because your router or firewall are blocking the connection. Therefor you would need to see if your router is port forwarding to your pc at port 2593 (unless you changed it) and your firewall should allow incoming traffic at the same port
 
You can change the name and the ip to a static one (but you can also use the default autodetection) inside the Server.cfg in your Config folder.

If they cant connect it would probably be because your router or firewall are blocking the connection. Therefor you would need to see if your router is port forwarding to your pc at port 2593 (unless you changed it) and your firewall should allow incoming traffic at the same port


Yeah I was told about the firewall.. I even tried turning it off.. hmph. I tried opening the server.cfg and it won't open for me. it opens a browser and doesn't load anything. How do I check the router forwarding?
 
the Server.cfg is basically just a textfile so you can open it with every editor around. And the forwarding depends on your router
but there should be something like a security tab or something along those lines where you can choose the port forwarding
 
Ok I got the name changed! Thank you for that very much :) now I just need to change the IP. can I change it in Config like I did with the server name? seems to work better than what I was trying.
 
You can do that there yes, you could turn the autodetect off in that case. However does it show you ip addresses in yellow I think? (dont post them :p ) because that would be your external ip that the programm detected and the one the others need to connect
 
the autodetect does what it says :p it autodetects the external ip for you by connecting to websites to get the ip.

The configs also have small descriptions of what the settings do
 
so if I turn the autodetect on I shouldn't have to enter any IP ? just have people use the standard one when logging in ? the 127.0.0.1?
 
if autodetect is on you give them your external ip, 127.0.01 is your pc's local ip. It is the same for everyone there ;) your local network ip will be something like 192.168.x.x

For your external it should say something like
ServerList: <<<< xxx.xxx.xxx.xxx
ServerList: Done: 'xxx.xxx.xxx.xxx'
 
Hahha sorry for all the silly questions ;) so I found my local IP than I went into config , server and changed it to that. so now give that to someone to try and log in ?
 
no, unless they are in your LOCAL connection :p as in your house so to say, you want your external ip and they want it to connect to you, since they are external of your house / network ;)
 
ohhh.. I'm sorry. I feel silly :( so my external ip I can look up by typing my ip into google, correct? and then I want to put my external ip into the "config" "server" and have autodetect ON?
 
:( I am bad at this ok? :p

So lets start over
Autodetect on:
- look for the "ServerList: <<<< xxx.xxx.xxx.xxx" thats the external ip it got.
- Give that to people to connect, it is your external ip.
- If they cant connect there would probably be an problem with your port forwarding or your firewall.

Autodetect off: (used if you use something like dyndns or you want it to be static)
- you add the external ip yourself to the config.
- give that ip to people to connect.
- if they cant it is probably an problem with port forwarding or your firewall.
 
Ok, where do I look for the serverlist? I have so many different things up on my screen (ServUO, UOsteam, files, codes) aghh. I am sorry if I am asking too many questions! I feel like this is really simple. lol
 
So.. I have recently made a new shard (as I stated) . and someone is trying to log into it. and they cant seem to. So I was reading stuff online, because I have forgotten how to make a server public. And it said to go into "scripts" and then "misc" and then "serverlist" and put your IP in here... public static readonly string Address = null; . but I'm not sure if this is correct. also, I tried to rename my shard by replacing the line "My Shard" with the name.. any help?! please :)

Did you change the script file? for the IP I mean. and autodetect is on right?
 
I believe the autodetect is on. do you want me to copy and paste what the files say, the areas that I changed and then put back? idk why serverlist isn't showing up :( is there a different area on the forums I should post in ? ugh I'm frustrated. I appreciate your help :) I know I can be irritating with all the questions, just ask my husband :p lol
 
Well if you changed something in the scripts for that you could revert that by replacing the files with what you had befor. And in the config for autodetect it should be this (just without the descriptions here)

Code:
Name=My Shard <--- your name though
AutoDetect=true
@Address=
@Port=2593

Those are the default values
 
Okay. In ServUO, "Config", "Server", this is what it says:


# The displayed name of the shard
Name=UO Refreshed

# 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 ServUO will attempt to discover your public IP address for you automatically.
AutoDetect=true

# 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 ServUO 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.
@Address=

# The Port to bind the Listener to.
# Default: 2593
@Port=2593




THEN, in ServUO, "Scripts", "Misc", "Serverlist" This is what it says,

#region Header
// **********
// ServUO - ServerList.cs
// **********
#endregion

#region References
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using System.Threading;
#endregion

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 ServUO 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 ServUO 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 = Config.Get("Server.Address", "null");

public static readonly bool AutoDetect = Config.Get("Server.AutoDetect", true);

public static string ServerName = Config.Get("Server.Name", "UO Refreshed");

private static IPAddress _PublicAddress;

private static readonly Regex _AddressPattern = new Regex(@"([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})");

public static void Initialize()
{
if (Address == null)
{
if (AutoDetect)
{
AutoDetection();
}
}
else
{
Resolve(Address, out _PublicAddress);
}

EventSink.ServerList += EventSink_ServerList;
}

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

var ipep = (IPEndPoint)s.LocalEndPoint;

var localAddress = ipep.Address;
var localPort = ipep.Port;

if (IsPrivateNetwork(localAddress))
{
ipep = (IPEndPoint)s.RemoteEndPoint;

if (!IsPrivateNetwork(ipep.Address) && _PublicAddress != null)
{
localAddress = _PublicAddress;
}
}

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

public static string[] IPServices =
{
"http://services.servuo.com/ip.php", "http://api.ipify.org",
"http://checkip.dyndns.org/"
};

private static void AutoDetection()
{
if (!HasPublicIPAddress())
{
Utility.PushColor(ConsoleColor.Yellow);
Console.WriteLine("ServerList: Auto-detecting public IP address...");

_PublicAddress = FindPublicAddress(IPServices);

if (_PublicAddress != null)
{
Console.WriteLine("ServerList: Done: '{0}'", _PublicAddress);
}
else
{
_PublicAddress = IPAddress.Any;

Console.WriteLine("ServerList: Failed: reverting to private IP address...");
}

Utility.PopColor();
}
}

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

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

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

private static bool HasPublicIPAddress()
{
var adapters = NetworkInterface.GetAllNetworkInterfaces();
var uips = adapters.Select(a => a.GetIPProperties())
.SelectMany(p => p.UnicastAddresses.Cast<IPAddressInformation>(), (p, u) => u.Address);

return
uips.Any(
ip => !IPAddress.IsLoopback(ip) && ip.AddressFamily != AddressFamily.InterNetworkV6 && !IsPrivateNetwork(ip));
}

private static bool IsPrivateNetwork(IPAddress ip)
{
// 10.0.0.0/8
// 172.16.0.0/12
// 192.168.0.0/16
// 169.254.0.0/16
// 100.64.0.0/10 RFC 6598

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

if (Utility.IPMatch("192.168.*", ip))
{
return true;
}

if (Utility.IPMatch("10.*", ip))
{
return true;
}

if (Utility.IPMatch("172.16-31.*", ip))
{
return true;
}

if (Utility.IPMatch("169.254.*", ip))
{
return true;
}

if (Utility.IPMatch("100.64-127.*", ip))
{
return true;
}

return false;
}

public static IPAddress FindPublicAddress(params string[] services)
{
if (services == null || services.Length == 0)
{
services = IPServices;
}

if (services == null || services.Length == 0)
{
return null;
}

IPAddress ip = null;

Uri uri;
string data;
Match match;

foreach (var service in services.Where(s => !String.IsNullOrWhiteSpace(s)))
{
try
{
uri = new Uri(service);

Console.WriteLine("ServerList: >>> {0}", uri.Host);

using (var client = new WebClient())
{
data = client.DownloadString(uri);
}

Console.WriteLine("ServerList: <<< {0}", data);

match = _AddressPattern.Match(data);

if (!match.Success || !IPAddress.TryParse(match.Value, out ip))
{
ip = null;
}
}
catch (UriFormatException)
{
Console.WriteLine("ServerList: Invalid IP service Uri '{0}'", service);

ip = null;
}
catch
{
ip = null;
}

if (ip != null)
{
break;
}
}

return ip;
}
}
}
[doublepost=1489715056][/doublepost](Sorry for all the extra stuff at the bottom I accidentally copied that wasn't relevant.) I really cant thank you enough for taking the time to answer me and try to help me with this. I am at a loss. I don't understand why the serverlist isn't showing up in the servuo when I start it up.. I wish I was more knowledgeable in codes.
 
Seems like you got an public ip address listed there thats why it doesnt search, then you need to go to an service like http://services.servuo.com/ip.php and you can read your ip, put that into uosteam or razor and try to connect with that (that would be your external ip)
 
well if it usually works fine without admin rights it doesnt need it now. You just need the server running and then you put your external ip into the server ip field and see if you can connect using that one
 
Nope, I put that IP in and it says I cant connect to Ultima Online. Arghhh I don't understand it! I do appreciate you taking the time to try and help. Thank you :)
 
in that case I would say that your router isnt forwarded yet to direct the incoming people onto your pc to the port the server listens to ;) and for that it depends on the router you have
 
Milva but she wants to have the server being open to the public, not just locally ;) . And Jessica you would connect to the router from your computer yes.
 
If your logging in on the same computer the server is hosted use 127.0.01 for the ip login


Thank you for taking the time to help :) If you go through the forum, I have posted what is going on with my server. I have recently made a new server and have been trying to figure out how to make it public, all day now. haha. I am at a loss. So, my next step will be trying to access the router and change the info on it so it can be accessed? Any websites or anything with instructions on how to do that? (I've never done it before) . I really appreciate all the help you guys!
 
OK I think you are confused about IP addresses. Everyone on the internet has an identity which is represented by a public IP address which is held by your router. Inside your house you have a set of private IP addresses which start 192.168.x.x usually 192.168.1.x and x goes from 1 to 254. The router itself usually uses the internal IP address 192.168.1.1 or maybe 192.168.1.254. So the PCs on your home network will be given an IP address in the range between 192.168.1.2 and 192.168.1.253 - nobody in the outside world can access those 192.168.x.x IP addresses because the internet rules say that they cannot be routed and this helps to create a firewall to block out intruders.

Because of this your router needs to be told to send information to the right PC depending on the information it is getting. For UO this information usually comes in on port 2593 (There are 65535 ports and many are dedicated to certain tasks. UO uses 2593 unless you have told it to use a different one)

In your router settings there will be a page for "Port Forwarding" and you will need to make an entry on that page to forward port 2593 to the IP address of the PC you are using as the server. This will most likely start 192.168.1.x and will be shown in the text that displays when you run the UO server as "Listening" and there should be just one starting 192.168.something.

Then you have to let the people who you want to play know the public IP address of your router which again should be in your router settings. That "Public" IP will also be in the numbers you see in the text that shows when you run the server. For example mine says: ServerList: Auto-detecting public IP address...done (84.45.188.193) but don't try to connect to that because it doesn't go anywhere :) My game server and test server have dedicated IP addresses.

The other thing you need to be aware of is that many people don't have a fixed IP address and every time they restart their router they will get a new public IP address. If you are one of these people then if your router restarts people will no longer be able to access your game server until you give them the new IP address of the router which will be displayed again on the "Server List" line when you start the UO server.

I hope that helps you. It can be confusing and daunting if you are not a computer buff.

David
 
OK I think you are confused about IP addresses. Everyone on the internet has an identity which is represented by a public IP address which is held by your router. Inside your house you have a set of private IP addresses which start 192.168.x.x usually 192.168.1.x and x goes from 1 to 254. The router itself usually uses the internal IP address 192.168.1.1 or maybe 192.168.1.254. So the PCs on your home network will be given an IP address in the range between 192.168.1.2 and 192.168.1.253 - nobody in the outside world can access those 192.168.x.x IP addresses because the internet rules say that they cannot be routed and this helps to create a firewall to block out intruders.

Because of this your router needs to be told to send information to the right PC depending on the information it is getting. For UO this information usually comes in on port 2593 (There are 65535 ports and many are dedicated to certain tasks. UO uses 2593 unless you have told it to use a different one)

In your router settings there will be a page for "Port Forwarding" and you will need to make an entry on that page to forward port 2593 to the IP address of the PC you are using as the server. This will most likely start 192.168.1.x and will be shown in the text that displays when you run the UO server as "Listening" and there should be just one starting 192.168.something.

Then you have to let the people who you want to play know the public IP address of your router which again should be in your router settings. That "Public" IP will also be in the numbers you see in the text that shows when you run the server. For example mine says: ServerList: Auto-detecting public IP address...done (84.45.188.193) but don't try to connect to that because it doesn't go anywhere :) My game server and test server have dedicated IP addresses.

The other thing you need to be aware of is that many people don't have a fixed IP address and every time they restart their router they will get a new public IP address. If you are one of these people then if your router restarts people will no longer be able to access your game server until you give them the new IP address of the router which will be displayed again on the "Server List" line when you start the UO server.

I hope that helps you. It can be confusing and daunting if you are not a computer buff.

David

David, you have no idea how much I appreciate you taking the time to try and explain things to me and help. I live in a duplex and my router is plugged into the main router so that I can get full wifi bars. Everytime I've checked my public IP it's been the same. When I start ServUO it skips "serverlist" and goes directly to "listening" there is no "serverlist " on the ServUO screen. But anyway I tried forwarding ports on my router's Web page.. which did not work. But right now I'm going to go look at the main router and see what the info is on it . Then I will go to the Web page and try forwarding the port for the main router. Then, theoretically, It Should work... right? Also.. I am not sure if I'm inputting it correctly into the ServUO files :( wish I could just pay someone to do this for me hahaha
 
In theory forwarding the port between your routers should work but it's really getting messy especially if you are also using a WiFi connection rather than hard-wired. All that complexity is going to be introducing lag.
 
Back