How to reach the same ryzom server from both Internet and your local network

Added by molator over 9 years ago

The domain or ip in FSHost (code/ryzom/server/frontend_service.cfg) must be reachable by all clients.

I will assume that you created the following dyndns (or no-ip):

mydns.dyndns.org

and that your server ip is:

192.168.1.100

Set up your router with the dyndns and add a rule to map the port 40916 of your router to your server.
The clients from Internet will be able to reach your server using the dyndns resolution.

Add your server local ip and your dyndns in your hosts file (on the same line):

192.168.1.100 mydns.dyndns.org

The clients from your local network will be able to reach your server using the hosts file resolution.

Set FSHost in code/ryzom/server/frontend_service.cfg:

FSHost = "mydns.dyndns.org";

Set StartupHost in your client.cfg:

StartupHost = "mydns.dyndns.org:40916";

That's all folks!


Replies (8)

RE: How to reach the same ryzom server from both Internet and your local network - Added by Max_De_Groot over 7 years ago

What if you don't have a dyndns... but 2 IP's?

I don't have FSHost in frontend_service.cfg, but FSListenHost, so tried to put
the 2 IP's there, but it only accepts the first IP...
Adding FSHost results in a failure to start the service...

Already set my router's NAT to rout ryzom requests to the server, and it works
like a charm... but either on my LAN or on internet... not both

Is there a simple config solution for this? or do I have to edit the frontend service itself?

Sry for the noobsh questions... been a LONG time since I last did any programming...

RE: How to reach the same ryzom server from both Internet and your local network - Added by molator over 7 years ago

Use the Internet ip instead of the dyndns and copy that ip in all of your local machine hosts file.
That way the remote clients will use the DNS to reach your shard,
and you will use your local hosts file.

RE: How to reach the same ryzom server from both Internet and your local network - Added by Max_De_Groot about 7 years ago

unfortunately that doesn't work. If I use my external IP from my lan, I automaticaly
get redirected to my router's setup page. (NAT loopback issues are very common with
ISP provided routers/modems)

With some help I might be able to add an option to the code as to provide an internal IP
for clients within the local network. If someone can tell me what cpp file is used for
sending IP to client and reading IP from config that would speed up my attempt...
(I'm sure there are a few out here that know what files I need without having to search code ;) )

The workaround I use now is to change the IP is FSconfig just before I want to log in locally.
When there are regular players, that won't be an option anymore, since they can't log in from
internet until I change the IP again...

RE: How to reach the same ryzom server from both Internet and your local network - Added by molator about 7 years ago

As written in my Wiki:
http://dev.ryzom.com/projects/ryzom/wiki/ConnectingShardFromInternetAndLAN

Note: With most of the routers, we can't reach a local machine from LAN using the external IP.

And as explain, you will use the local hosts file instead of the DNS.
External connections will be resolved with the DNS,
internal connections will the hosts file.

RE: How to reach the same ryzom server from both Internet and your local network - Added by Max_De_Groot about 7 years ago

I can't find a hosts file anywhere.
Just a file named "hosts" with "192.168.1.100 mydns.dyndns.org" as content in my client dir?

RE: How to reach the same ryzom server from both Internet and your local network - Added by kervala about 7 years ago

Under Windows, hosts file is located at C:\Windows\System32\drivers\etc\hosts and under Linux at /etc/hosts.

RE: How to reach the same ryzom server from both Internet and your local network - Added by Max_De_Groot about 7 years ago

as this isn't a solution for the client/server itself, I'll see if I can find
a serverside solution. If I get visitors, I like to play on my server without
having to change their computer settings.
Can take a while tho.

Thnx for the information.

RE: How to reach the same ryzom server from both Internet and your local network - Added by molator about 7 years ago

Something that could help you.
Don't remember who wrote it.

SU_WAN_LAN.diff (1.3 kB) Magnifier

(1-8/8)