Domain Name Resolving

I'm running an online game through my vps, and on other hosts (that I didn't set up and run myself) IPs from players connecting would resolve to their host names, however, here, all I see are IPs. I believe this is something I did not setup or something that is setup incorrectly on my end, however, I'm unsure as of where to turn to resolve the issue. Can anyone tell me how to rectify this issue?

Much thanks.

6 Replies

do you have DNS servers in /etc/resolv.conf? does DNS resolution work from a command line (eg nslookup/host/dig)?

@glg:

do you have DNS servers in /etc/resolv.conf? does DNS resolution work from a command line (eg nslookup/host/dig)?

root@mud:/etc# nslookup
> root@mud:/etc# nslookup www.google.com
Server:         97.107.133.4
Address:        97.107.133.4#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 64.233.169.103
Name:   www.l.google.com
Address: 64.233.169.99
Name:   www.l.google.com
Address: 64.233.169.147
Name:   www.l.google.com
Address: 64.233.169.104

root@mud:/etc# host www.google.cat
cawww.google.cat        CNAME   www.google.com
www.google.com          CNAME   www.l.google.com
www.l.google.com        A       64.233.169.103
www.l.google.com        A       64.233.169.99
www.l.google.com        A       64.233.169.147
www.l.google.com        A       64.233.169.104
root@mud:/etc# cat /etc/resolv.conf
domain members.linode.com
search members.linode.com
nameserver 97.107.133.4
nameserver 207.192.69.4
nameserver 207.192.69.5
root@mud:/etc# 

Firstly, I don't know if that means it's working or not, and second, I was curious if not setting my domain name in resolv.conf or somewhere else would cause this.

Often times, applications will have a setting for whether or not to do reverse lookups. Doing it in real time is relatively useless, and they can take a long time to perform. It looks like your DNS stuff is set up correctly, so I'd check your application's settings to see if there's something for that.

@hoopycat:

Often times, applications will have a setting for whether or not to do reverse lookups. Doing it in real time is relatively useless, and they can take a long time to perform. It looks like your DNS stuff is set up correctly, so I'd check your application's settings to see if there's something for that.

If it's not a setting, check to see if the application requires some kind of dns library that you don't have installed (eg perl's Net::DNS, aka libnet-dns-perl in debian/ubuntu).

I tried the package and restarting my game, and I believe I'm already on 32-bit Debian, so I don't know what the problem is as the domain still would not resolve. However, I simply rewrote the socket connection part so it no longer resolves domains and I will simply see IPs. It is more convenient that way anyway, but I do appreciate the help you all gave. :)

If you use Apache for a web-based game, bear in mind that by default name resolution is off. You'll want to turn it on if that's what you want. However, it's probably better to leave it off and use a log analyzer later to resolve them.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct