8

I'm having trouble finding the domain name of my school's server, I read another question similar to this but their commands didn't work.

I tried to use nslookup and then when I was prompted I entered server. I get the following output. I don't understand where the domain name is stored. I'm using a wired LAN connection from my university.

Default Server: 127.0.01
Address: 127.0.0.1#53
Default Server: ::1
Address: ::1#53 
  • please would you clarify [...] and then when I was prompted I entered server , you do know the server ip right? thx – lese Jan 21 '16 at 0:28
  • yes I do know the server's ip – Katz Jan 21 '16 at 0:32
7

You should nslookup the IP. It will return. Example.

[nazu@healer ~]$ nslookup
> bro-ns-01
Server:         10.100.1.2
Address:        10.100.1.2#53

Name:   bro-ns-01.angelsofclockwork.net
Address: 10.100.1.2
> 10.100.1.2
Server:         10.100.1.2
Address:        10.100.1.2#53

2.1.100.10.in-addr.arpa name = bro-ns-01.angelsofclockwork.net.
> 

I'm assuming you're using dnsmasq or otherwise, because your server address is set to your localhost. If that's the case, it should still be transparent enough to pull the information.

You could also look at /etc/resolve.conf if you're on the same network. You're more than likely being given a reverse DNS entry that has the same domain suffix of static servers.

[nazu@healer ~]$ cat /etc/resolv.conf 
; generated by /usr/sbin/dhclient-script
search angelsofclockwork.net.
nameserver 10.100.1.2
6

You can use the following command:

dig -x 192.168.94.3

(put the correct IP address in, of course)

The answer section will list the domain name of the ip address.

-x makes it do a reverse lookup. If your DNS server isn't giving you good answers, you can specify the DNS server to use by putting something like '@ns1.afraid.org' before the -x.

nslookup was depreciated years ago, I was actually surprised to find that it's still around.

1

you can also use the host command: host -a 1.2.3.4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.