PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Support for DNS resolution in servers.cfg

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Mon Jul 17, 2006 8:57 am    Post subject: Support for DNS resolution in servers.cfg Reply with quote

Hi,

our live shard has a static IP, but when testing new POL releases
on my home server, I always have to correct the servers.cfg
and enter the current external IP first before booting POL, so that
other people will be able to log onto my shard.

I'm wondering if support for DNS resolution in servers.cfg could be
added, so that POL would resolve that DNS name at least once when booting, and then use the corresponding IP.

I then could use my dyndns address, and wouldn't have to worry
about updating the servers.cfg anymore.

Thanks,
Xandros

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Mon Jul 17, 2006 9:22 am    Post subject: Reply with quote

Just to clarify, I'm behind a router, so POL can't detect my external IP.

Xandros

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Mon Jul 17, 2006 11:40 am    Post subject: Reply with quote

Maybe this was taken out but I always used my no-ip address (tribulation.sytes.net) in my servers.cfg. Strange.

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 354
Location: San Diego, California

PostPosted: Mon Jul 17, 2006 11:52 am    Post subject: Reply with quote

Yeah.. its supported host names for me as well. The problem seems to be your machine cant resolve them into an IP.

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Mon Jul 17, 2006 12:19 pm    Post subject: Reply with quote

Austin wrote:
Yeah.. its supported host names for me as well. The problem seems to be your machine cant resolve them into an IP.


Actually I never tried it with a hostname. There doesn't seem to be any
documentation about DNS support, the docs only mention IP numbers.
So I presumed there was no support for it.

Xandros

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Mon Jul 17, 2006 5:02 pm    Post subject: Reply with quote

Always resolved hostname for me too. Xan I think there used to be something a few versions ago mentioning hostname resolution buty I thing that line got removed from either the docs or the servers.cfg file comments somewhere along the way. Either that or it was mentioned on one of the incarnations of the POL forums way back sometime.

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Mon Jul 17, 2006 5:13 pm    Post subject: Reply with quote

servers.cfg does indeed support entering a hostname. However, the UO client only accepts IP addresses, so the server will resolve them.

I think it works pretty well as-is, but in a NAT scenerio with dynamic IPs, I think there are two things to help;

First, your NAT device should be set to allow redirection back in from internal connections. I think a lot of people behind NAT fall into this trap, because some NAT devices enable redirection by default, and others don't, so it's not something frequently mentioned. Of course, you could otherwise use a separate servers.cfg entry marked only for your LAN to point to the LAN address, so you don't bother the NAT device with it.

Second, when a dynamic address changes, POL makes no effort to update itself. Of course, it has no way of knowing, as has already been mentioned. So it will keep sending the resolved IP address it got on startup to clients; The client will connect to the login server part, but fail to connect to the game server part, because the login server part is still sending it's old information.

I addressed this issue on our test server, which we have behind our DSL on NAT, with an external program that periodically checks for an IP change. When it detects a change, it does the Dynamic DNS update, of course. Since we've been using 096 for our test server for a while, I used packet hooks to address this. The program noted above also connects to our test/096 server to a simple script I made that sets a global property with an array of the bytes of the IP address. I hooked the 'connect' packet from the server to insert that information instead of what it gets from servers.cfg. The hook I have checks first to see if the connect packet being sent out contains the private LAN ip information; if so, it leaves it alone. If not, it alters the info from the global property.

Author Message
Shinigami
POL Core Developer


Joined: 30 Jan 2006
Posts: 292
Location: Germany, Bavaria

PostPosted: Wed Jul 19, 2006 7:11 am    Post subject: Re: Support for DNS resolution in servers.cfg Reply with quote

Xandros wrote:
our live shard has a static IP, but when testing new POL releases on my home server, I always have to correct the servers.cfg and enter the current external IP first before booting POL, so that other people will be able to log onto my shard.

just use something like DynDNS, let it update by your Router and enter this DNS-entry in your servers.cfg - works fine since years...

Shinigami

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 520

PostPosted: Wed Jul 19, 2006 7:16 am    Post subject: Reply with quote

My real issue with putting the domain name in servers.cfg was that every now and again dns servers go slow or have issues.

Looking up the dns of the connection runs critical, meaning the whole shard can freeze when the server's dns server is running slow. It happened to me on a couple of occasions and I eventually went back to putting in the ip address.

Author Message
Shinigami
POL Core Developer


Joined: 30 Jan 2006
Posts: 292
Location: Germany, Bavaria

PostPosted: Wed Jul 19, 2006 7:31 am    Post subject: Reply with quote

that's true. in this case, an external program resolving dns in a loop and creating a servers.cfg would be the solution - I think so.

Shinigami

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Wed Jul 19, 2006 1:23 pm    Post subject: Reply with quote

Shini is the servers cfg read in once by POL or does POL refresh from the disc while it is running. If it refreshes then an external program could run alongside POL and update servers.cfg in the event of an IP change.

Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty