View unanswered posts | View active topics
| Author |
Message |
|
zandor70
|
Post subject: POL on server with non static IP Posted: Sun Apr 01, 2007 1:18 am |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
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?
_________________ Zandor
|
|
| Top |
|
 |
|
mr bubbles
|
Post subject: Posted: Sun Apr 01, 2007 1:30 am |
|
Joined: Thu Jan 18, 2007 2:34 am Posts: 91
|
|
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.
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Sun Apr 01, 2007 4:54 am |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
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.....
_________________ Zandor
|
|
| Top |
|
 |
|
mr bubbles
|
Post subject: Posted: Sun Apr 01, 2007 5:02 am |
|
Joined: Thu Jan 18, 2007 2:34 am Posts: 91
|
|
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 :/
|
|
| Top |
|
 |
|
tekproxy
|
Post subject: Posted: Sun Apr 01, 2007 6:47 am |
|
 |
| Distro Developer |
 |
Joined: Thu Apr 06, 2006 5:11 pm Posts: 350 Location: Nederland, Texas
|
|
Is your router configured to allow incomming traffic on your server port to your computer's network address?
|
|
| Top |
|
 |
|
Barbeirosa
|
Post subject: Posted: Sun Apr 01, 2007 7:13 am |
|
|
|
|
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.
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 9:49 am |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
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).
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Sun Apr 01, 2007 10:59 am |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
|
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....
_________________ Zandor
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 11:22 am |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
Is port forwarding on in your router, for the correct IP of the server?
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Sun Apr 01, 2007 12:57 pm |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
|
Yes... I have 3 pc on lan but nat is enabled for ALL ports on my pc 192.168.1.2....
_________________ Zandor
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 12:58 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
Have you also check to make sure, the people are getting the correct new IP of the dyndns ?
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Sun Apr 01, 2007 1:53 pm |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
|
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.
_________________ Zandor
|
|
| Top |
|
 |
|
OldnGrey
|
Post subject: Posted: Sun Apr 01, 2007 4:42 pm |
|
Joined: Sat Feb 04, 2006 6:26 pm Posts: 558
|
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 
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 5:10 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
Ok, will have to check out that code in the future then, and see if it can changed on it's habits.
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
OldnGrey
|
Post subject: Posted: Sun Apr 01, 2007 8:29 pm |
|
Joined: Sat Feb 04, 2006 6:26 pm Posts: 558
|
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
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 9:44 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
Ok, you say they can't connect.
Few things here to try to for me, and please give me the results (since it's worked for me in the past, i thought).
Can they connect at all? do they pass login, but just can't connect to selected server?
Try flushing your DNS when this happens on the server pc, and then re=register it (with POL running).
Win2k and up
Code: ipconfig /flushdns ipconfig /registerdns
after doing this, and that host pc verifies it pings the new address, does that make a difference?
And btw, I think they won't make a difference, as I typed this I looked at the code and it appears it doesn't refresh the IP (but only glanced)
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Sun Apr 01, 2007 9:51 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
Oh yeah, and what OS is this on mate?
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
OldnGrey
|
Post subject: Posted: Sun Apr 01, 2007 10:31 pm |
|
Joined: Sat Feb 04, 2006 6:26 pm Posts: 558
|
|
All the tests were on Win32 version of the core.
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Mon Apr 02, 2007 3:47 am |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
|
If I restart pol I think it is ok.
The problem is only that when I go work and are away from home if IP changes I cant't allow developer to interter in server for design of a new map.
_________________ Zandor
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Mon Apr 02, 2007 5:56 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
How about I find out the OS like I asked last night? Will definitely help here 
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Mon Apr 02, 2007 10:02 pm |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
|
I use XP PRO SP2
_________________ Zandor
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Mon Apr 02, 2007 10:07 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
kk, gives me a little more to go on. May have found a linux bug besides yours 
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
Barbeirosa
|
Post subject: Posted: Tue Apr 03, 2007 8:11 am |
|
|
|
The behavior is also the same on Windows 2000 Advanced Server, although Windows itself does not seem to be the cause. Other programs running on the same machine at the same time do get the updated IP address.
Here's pseudo-code of the entry point of the program I use to check for an IP change on my building shard.
Code: int main(){ try{ char oldIP[16]; char newIP[16]; char hostName[11] = "my.url.com";
oldIP = getOldIPFromPersistentStorage(); //such as Windows Registry, file stream, etc. newIP = resolveHostName(hostName); if (strcmp(oldIP, newIP)){ cout << "IP Changed: " << newIP << endl; sendNewIPToPOLAux(newIP); //WWW script works, too. saveNewIPToPersistentStorage(newIP); }else{ cout << "No IP Change.\n"; } cout << "Done"; return 0; }catch (char* error){ cout << "Error: " << error; return 1; } }
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Tue Apr 03, 2007 9:53 pm |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
zandor, do me a few favors. I just tested with dyndns.org, and when i tried to login, it gave correct IP. I them manually changed the IP from their site, tried again, and sent the client the different ip (Used UOLog to see the packets).
So it worked just fine for me. Can you give me more info?
Manually change the IP With POL running. Do a "tracert <dyndns name>" from the command prompt. Soon as you see the ip no longer takes only 1 hop (to your router), and keeps going to try to reach the new ip, try to log into POL again. Does it send the new ip, or the old for the server screen?
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
zandor70
|
Post subject: Posted: Wed Apr 04, 2007 9:58 am |
|
Joined: Fri Feb 10, 2006 10:06 am Posts: 79 Location: Italy
|
I have a question:
In my hosts cfg at
c:\windows\system32\drivers\etc\hosts
I have the row:
192.168.1.2 zandorhome.homeip.net
It is correct?
I do the tracert from my pc:
Code: C:\windows\system32>tracert zandorhome.homeip.net
Rilevazione instradamento verso zandorhome.homeip.net [192.168.1.2] su un massimo di 30 punti di passaggio:
1 <1 ms <1 ms <1 ms zandorhome.homeip.net [192.168.1.2]
and from another pc in vnc section: Code: C:\Documents and Settings\zulu1>tracert zandorhome.homeip.net
Rilevazione instradamento verso zandorhome.homeip.net [151.65.255.212] su un massimo di 30 punti di passaggio:
1 <10 ms <10 ms <10 ms 89-186-67-129.hostpool.ip.kpnqwest.it [89.186.67 .129] 2 <10 ms 1 ms <10 ms CS1-Ge2-3-CAL2.MLA.kpnqwest.it [195.43.160.153]
3 <10 ms <10 ms <10 ms CR1-Ge5-7-CAL2.MLA.kpnqwest.it [195.43.160.177]
4 <10 ms <10 ms <10 ms CR2-Ge5-8-CAL2.MLA.kpnqwest.it [195.43.160.174]
5 1 ms 2 ms 2 ms R2-Ge3-0-CAL1.MLA.kpnqwest.it [195.43.160.41] 6 <10 ms <10 ms <10 ms wind2.mix-it.net [217.29.68.9] 7 15 ms 13 ms 13 ms 151.6.1.49 8 20 ms 20 ms 19 ms 151.6.4.94 9 20 ms 20 ms 20 ms 151.7.22.78 10 * * * Richiesta scaduta. 11 28 ms 28 ms 28 ms 151.65.255.212
Rilevazione completata.
At momenti my ip is 151.65.255.212
What I must do? manualli change my ip in web pages of dyndns?
_________________ Zandor
|
|
| Top |
|
 |
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|

|