Request : Make server address resolve on client side

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Hideki
Engineer
Engineer
Posts: 7
Joined: 28 Jan 2005 16:52

Request : Make server address resolve on client side

Post by Hideki »

Hi.

I have set up a dedicated openttd server but the address of the server is resolved on advertise and client is forced to use the IP address and not the DNS address of the server.

Thus in an enviroment like mine which has internal DNS and external DNS set different cannot reach the server that the openttd master server has resolved, where I have the server as part of LAN address, as well as the global address for other people to connect to.

So, it's better to send the DNS name address to client and let client resolve the IP to connect to.
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

How about some place to check the pings?
One in the server browser, second in-game.

Hmm... how about console command "draw_pings 1" which would draw small table with pings near menu\status bar

Back to topic, sometimes showing DNS is good, so how about both IP and DNS?
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: Request : Make server address resolve on client side

Post by TrueBrain »

Hideki wrote:Hi.

I have set up a dedicated openttd server but the address of the server is resolved on advertise and client is forced to use the IP address and not the DNS address of the server.

Thus in an enviroment like mine which has internal DNS and external DNS set different cannot reach the server that the openttd master server has resolved, where I have the server as part of LAN address, as well as the global address for other people to connect to.

So, it's better to send the DNS name address to client and let client resolve the IP to connect to.
No, sending DNS names is very bad. But... I assume you have multiple IPs on your OpenTTD-server-pc? If so, use 'set server_bind <ip>' to bind to a certain IP.
Hideki
Engineer
Engineer
Posts: 7
Joined: 28 Jan 2005 16:52

Post by Hideki »

Ok, I'll be more specific.

Right now I run one openttd server at IP address 218.219.203.156 (Listed at http://servers.openttd.org)

It's no problem accessing from outside my network, but my network has DNS servers set for internal and external IP different, which means I forward the openttd ports on the router, so outside IP gets to the destination, but from inside I use the LAN IP (like 192.168.0.1) to access the server myself, but since I'm forced to access the server as a global IP from INSIDE lan, the ports don't get forwarded, thus I cannot access the server (which just says "server offline" in the server list).

So, I was wondering if all the clients can resolve the IP via DNS name.
VPN-User
Traffic Manager
Traffic Manager
Posts: 136
Joined: 07 Jun 2002 08:43
Location: Radolfzell at Lake of Constance in Germany
Contact:

Post by VPN-User »

Bind the ottd server to the local ip and do a port forwarding on the external interface to the internal. Easy. If you have dynamic external ip, write a firewall update script that updates the forwarding.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Post by TrueBrain »

Hideki wrote:Ok, I'll be more specific.

Right now I run one openttd server at IP address 218.219.203.156 (Listed at http://servers.openttd.org)

It's no problem accessing from outside my network, but my network has DNS servers set for internal and external IP different, which means I forward the openttd ports on the router, so outside IP gets to the destination, but from inside I use the LAN IP (like 192.168.0.1) to access the server myself, but since I'm forced to access the server as a global IP from INSIDE lan, the ports don't get forwarded, thus I cannot access the server (which just says "server offline" in the server list).

So, I was wondering if all the clients can resolve the IP via DNS name.
If it is in your LAN, use the LAN setting and press Find Server, it will find your server.

Why DNS is out of the question:
Now 1 server takes 6 bytes (ip + port)
If we use DNS, it takes a lot more. And even more important: it is unsafe.
Hideki
Engineer
Engineer
Posts: 7
Joined: 28 Jan 2005 16:52

Post by Hideki »

Ok, I think I can use the LAN server listing ;)
Tx.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests