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
POL on server with non static IP
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Apr 01, 2007 5:18 am    Post subject: POL on server with non static IP Reply with quote

I Have config
Code:

GameServer
{
    Name    Server Test POL097 IP
    IP      151.65.251.224
    Port    2593
}

in my server test.

I have a dynamic ip and a DNS server adjust my ip at:
zandorhome.homeip.net

In servers.cfg I did the configuration:
Code:

GameServer
{
    Name    Server Test POL097
    IP      zandorhome.homeip.net
    Port    2593
}


but when IP change players can't connect.

Someone has a solution?

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Sun Apr 01, 2007 5:30 am    Post subject: Reply with quote

change the

IP zandorhome.homeip.net
to
IP --ip--

This way POL will use your current ip address, only need that dns for the players login.

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Apr 01, 2007 8:54 am    Post subject: Reply with quote

I have router... my pol don't know what is my public IP.

I have altready used config:
Code:

GameServer
{
    Name    Arredo su Zandor IP /2
    IP      192.168.1.2
    Port    2583
}

and player can't connect.....

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Sun Apr 01, 2007 9:02 am    Post subject: Reply with quote

hmm, ive only ever hosted one from behind a static ip address router.

I would have thought --ip-- would get the correct ip :/

Maybe have 2 server entries, --ip-- and --lan--

Just things to try i guess :/

Author Message
tekproxy
Distro Developer


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

PostPosted: Sun Apr 01, 2007 10:47 am    Post subject: Reply with quote

Is your router configured to allow incomming traffic on your server port to your computer's network address?

Author Message
Barbeirosa



Joined: 01 Feb 2007
Posts: 43

PostPosted: Sun Apr 01, 2007 11:13 am    Post subject: Reply with quote

Obviously, his router is configured to forward the port, otherwise people would -never- be able to connect to his server. He says that it only happens once his IP changes.

I happen to know the answer to this question, though. When POL starts up, it resolves your servers.cfg entry to the IP address. The Server List packet it sends out to clients does NOT accept a host name. So POL has to resolve the name to an IP and it sends the IP to the clients.

But POL has a bug with this. Once it resolve the IP, it never seems to check it again. If you restart your POL server after an IP change, you'll notice it magically works again, because POL again re-checks the host name to get the current IP.


Beyond restarting POL every time your IP changes, there's only one other way around this. Well, two. Three, actually...

First, bug the POL devs to make POL re-check host names entered in servers.cfg and resolve them to their current IP periodically.

Second, and the best option by far: Stop hosting POL on a dynamic IP connection.

Third, use a packet hook on the server list packet to get POL to send out the real, current IP, and not what it resolved at startup. You'd have to run some external program to periodically get the current IP and have it connect to an AUX or WWW script on POL. That AUX or WWW script would have to set the IP it gets to a Global property, which the server list packet hook would use to send to clients.

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sun Apr 01, 2007 1:49 pm    Post subject: Reply with quote

The DNS Resolving is done upon connection type attempts. Might look into that some in 098, I remember seeing reports about problems with that before.

Have you tried setting the computer's DNS to one of your ISP, rather than the router? That might help and solve the problem, as the router's DNS is what POL is using (as per your NIC card's setting).

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Apr 01, 2007 2:59 pm    Post subject: Reply with quote

mmm I have never used router IP as DNS and configure DNS on router... in my home lan all pc have DNS (208. 67.22.222) directly un network configuration....

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sun Apr 01, 2007 3:22 pm    Post subject: Reply with quote

Is port forwarding on in your router, for the correct IP of the server?

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Apr 01, 2007 4:57 pm    Post subject: Reply with quote

Yes... I have 3 pc on lan but nat is enabled for ALL ports on my pc 192.168.1.2....

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sun Apr 01, 2007 4:58 pm    Post subject: Reply with quote

Have you also check to make sure, the people are getting the correct new IP of the dyndns ?

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Apr 01, 2007 5:53 pm    Post subject: Reply with quote

Yes...
ping zandorhome.homeip.net
on a remote system on which I connect by VNC reply correct IP
But I have not tryed to restart POL when IP change.

Anymore I will do new test with 192.168.1.2 configuration.

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 520

PostPosted: Sun Apr 01, 2007 8:42 pm    Post subject: Reply with quote

Muad: As far as all my tests go, pol only reads the servers.cfg entry for the shard at startup even if you use the dns name.

It's never bothered me too much. New ip = restart shard. As long as you have updated your ddns service of course Smile

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Sun Apr 01, 2007 9:10 pm    Post subject: Reply with quote

Ok, will have to check out that code in the future then, and see if it can changed on it's habits.

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 520

PostPosted: Mon Apr 02, 2007 12:29 am    Post subject: Reply with quote

Just to clarify a bit more:

If you have the dns name in the servers.cfg, it goes out and does a lookup every time a player logs on. We noticed once that our dns server was slow and all logons were taking a while. Since this lookup runs in critical mode, the whole shard stopped while the dns query was done. So that part of it seems to be working. The test was extreme but quite definite! (incidently, be careful of putting domain name in servers.cfg if you ever think your dns server would take more than a few mS to respond)

The bit that only seems to be read at startup is the server's knowledge of its own address maybe around the bit that prints this in the start.log:
Quote:
hostname is myshard
address: 192.168.0.9
LAN IP address is 192.168.0.9

Post new topic   Reply to topic    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 




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