Domain Name System (DNS) is a service that provides the resolution of host names to IP addresses.

learn more… | top users | synonyms

49
votes
11answers
62k views

How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.
18
votes
6answers
7k views

Can I create override dns similar to writing in /etc/hosts without root access

I want to set a dns record that my browser will use, but I don't have root access, so I can't modify /etc/hosts. I need to do this for testing vhosts with apache, whose dns hasn't yet been set up. I ...
15
votes
4answers
14k views

What DNS servers am I using?

How can I check which DNS server am I using (in Linux)? I am using network manager and a wired connection to my university's LAN. (I am trying to find out why my domain doesn't get resolved)
14
votes
4answers
13k views

What is the point of sshd “UseDNS” option?

I know what it does, but i don't know why. What attack(s) does it prevent ? Is it relevant for all kind of authentication methods ? (hostbased, password, publickey, keyboard-interactive ...)
13
votes
4answers
16k views

How to clear DNS cache on DD-WRT

How can I clear the DNS cache in DD-WRT on my router? DD-WRT uses the dnsmasq daemon.
11
votes
3answers
718 views

Two commands, one pipeline

I need these two commands to be one (so I can pipe them further): dig +nottlid -t any bix.hu | egrep -v "^;;|^;|^$" | sort dig +nottlid -t any www.bix.hu | egrep -v "^;;|^;|^$" | sort I mean I ...
10
votes
1answer
2k views

How can I override the /etc/hosts file at user level? [duplicate]

Possible Duplicate: Can I create a user-specific hosts file to complement /etc/hosts? In short: I would like to know if it is possible to get a ~/hosts file that could override the ...
9
votes
2answers
13k views

What is a “recursive DNS query”? [closed]

Can someone explain in short what "recursive DNS query" means and how it can be considered bad?
8
votes
5answers
542 views

Host lookup that respects /etc/hosts

Utilities like host and dig let you see the IP address corresponding to the host name. There is also the getent utility that can be used to query /etc/hosts or other NSS databases. I am looking for ...
7
votes
1answer
8k views

Is there a way to get the Public DNS address of an instance?

I have a project wherein I need to update configuration files each time an EC2 instance is booted with the Public DNS address of the current instance. I'll be using Perl or Sed for this, so that's ...
7
votes
1answer
1k views

How to let `named` (bind9) forward certain domains to a different nameserver?

In dnsmasq, it's possible to forward domains to different nameservers. How can I do that in named? server=/foo.com/10.0.10.1 server=/vpn.foo.com/8.8.8.8
6
votes
5answers
12k views

dns queries not using nscd for caching

I'm trying to use nscd (Nameservices Cache Daemon) to cache dns locally so I can stop using bind to do it. I've gotten it started and ntpd seems to attempt to use it. But everything else for hosts ...
6
votes
1answer
290 views

Why the difference between network addresses reported by hostname and ping?

I have tried hostname and ping in a cluster machine, with different outputs. I am wondering what is the difference between the two? For example, on the same machine, hostname outputs node4.XXX and ...
6
votes
1answer
14k views

How to read the local DNS cache contents?

I know that on Windows I can issue ipconfig /displaydns and I see the local DNS's cache content. How can I list the DNS's cache content in Linux? I would like to get as much as cross-distro solution ...
6
votes
1answer
536 views

resolve the server hostname of a dnsmasq server with multiple subnets

I have a self-made Linux router running dnsmasq. It has two different NICs through which clients are connected; one of them has the subnet 192.168.1. and one the subnet 192.168.2.. My ...
5
votes
4answers
4k views

How to log all my DNS queries?

How can I create logs of every DNS query that my computer makes along with the responses it gets?
5
votes
5answers
16k views

Name resolution doesn't work, but nslookup does

I am having a very strange problem with my installation of Solaris 11. DNS resolution just won't work, but strangely enough, nslookup does and connectivity is fine: root@solarisxyz:~# ping ...
5
votes
5answers
3k views

/etc/resolv.conf changes during reboot

My ISP asked me to use custom nameserver settings. I have placed these in /etc/resolv.conf. Unfortunately, every time I reboot the computer, the contents of this file is changed. To connect to the ...
5
votes
3answers
9k views

Reverse DNS lookups slowing down network operations on LAN

Environment My LAN setup is quite basic: A router connected to the ISP's modem and the internet My development pc directly connected to the router The router provides DHCP but does not run its ...
5
votes
1answer
57 views

What is the effect of setting the timeout value to 0 in /etc/resolv.conf?

In order to fix a problem with DNS resolution in a particular customer environment, their admin has suggested adding options timeout:0 to the /etc/resolv.conf file on their CentOS 5 server. The man ...
5
votes
2answers
974 views

Configuring ssh fingerprints on dns to replace known_hosts fails

The SSHFP records were generated on the ssh server as follows and then added to the zone in bind: $ ssh-keygen -r www.test.us. www.test.us. IN SSHFP 1 1 ad04dfaf343a93beeb939eed1612168f7eadbed7 ...
5
votes
1answer
265 views

Why is dnsmasq putting my router IP in /etc/resolv.conf instead of 127.0.0.1?

I'm having DNS resolution issues in various contexts which appear to trace back to my networking configuration. I'm running just the dnsmasq-base installation of dnsmasq on two Linux installations ...
5
votes
1answer
336 views

Firefox unable to access domains defined in /etc/hosts if Network Manager is disconnected from a network

For developing web sites, I define test domains in /etc/hosts : 127.0.0.1 example.org I can then access example.org in the browsers. However I when the Network Manager is not connected to any ...
4
votes
2answers
359 views

dig vs nslookup

Why sometimes those two commands printing different results? ~$ dig facebook.com ; <<>> DiG 9.9.2-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ...
4
votes
2answers
3k views

Why `host` and `nslookup` on Solaris 10 resolves hostnames while `ping` and `telnet` does not?

/etc/resolv.conf contains a nameserver that is alive (as reported by the ping command) host or nslookup is able to resolve google.com $ host google.com google.com has address 74.125.228.3 google.com ...
4
votes
3answers
8k views

How to create a custom dynamic DNS solution?

You all probably know commercial dynamic DNS providers like dyndns.org or no-ip.com. But how to create a similar service for just a handful of machines? What server software would be best suited for ...
4
votes
2answers
303 views

Password protecting a system file? (e.g. /etc/resolv.conf)

I am trying to parental control myself by restricting web access via OpenDNS. The OpenDNS account password will be handed to someone trustworthy. Now, I want to put some restriction on the ...
4
votes
1answer
206 views

Why is my computer trying to send ICMP type 3 to OpenDNS?

In my firewall logs I see lots of entries like this. IN= OUT=eth0 SRC=192.168.1.105 DST=208.67.220.220 LEN=148 TOS=0x00 PREC=0xC0 TTL=64 ID=55705 PROTO=ICMP TYPE=3 CODE=3 [SRC=208.67.220.220 ...
4
votes
2answers
8k views

understanding DNS in ubuntu 12.04

I have Ubuntu 12.04 installed, and also use unbound and usually use openDNS as my DNS server. When I run dig google.com say I get SERVER: 127.0.0.1#53(127.0.0.1). What exactly is this thing listening ...
4
votes
2answers
1k views

What is resolv.conf and why VPN client's hack it?

As stated in a previous question I want to connect to 2 VPN servers at the same time and for each connection specify the IPs of computers I want to reach with it. One of this VPN connection is done ...
4
votes
2answers
1k views

What file to I have to edit to make static dns server in CentOS

Almost every distro I know will wipe /etc/resolv.conf on reboot (I think dhcp does this) and thus the place to add static dhcp entries varies per distro. How to I add static dns servers to a CentOS ...
4
votes
1answer
2k views

“Fake” DNS for a single host

I am running a bind9 dns server at my home network, serving for all my internal servers in my domain local / 192.168.x.x - one of those, extweb.local 192.168.1.33 is also visible from the internet as ...
4
votes
2answers
4k views

How to get networkmanager to configure domain specific name servers with openresolv + dnsmasq

I often connect to multiple network simultaneously. Each of these networks provide nameserver configuration via dhcp. E.g. Network 1: (eth0): domain company1.corp # nameserver 192.168.0.253 ...
4
votes
1answer
93 views

getaddrinfo() from shell? [duplicate]

When you call ping name.domain, it goes through both /etc/hosts and the DNS resolver to obtain an IP. It could be an IP hard-coded in /etc/hosts, or it could be one from the DNS server. It does so by ...
4
votes
1answer
139 views

Alternative to DNS for internal servers

I am setting up my first network at work. All the servers are running CentOS 6.3 and have statically assigned IP addresses. For example: server1 192.168.0.101 server2 192.168.0.102 I want to be ...
4
votes
2answers
2k views

Can't resolve CentOS 6.2 server by name from OS X

I just set up a new AirPort Extreme and CentOS 6.2 server - the server is meant to be a general-purpose storage machine, and so I've set up Samba and Avahi on it. I can easily access the server by IP ...
4
votes
1answer
682 views

Creating a new TLD for private network

I want to setup a new TLD (foo.) for my the private network so that I can host some child domains which will be accessible from within the network. For this purpose I have setup a DNS server ...
3
votes
5answers
3k views

How to overcome libc resolver limitation of maximum 3 nameservers?

Suppose I work in environment with number of domain changes and slow propagation. I want to test domain configuration immediately after setting change but the propagation is slow. So I want to add ...
3
votes
6answers
611 views

Find my computer on a LAN network

Let's say that I have a computer plugged in to a local network using a dhcp connection, so it will get a different IP every time. Is there a way to find this computer (so the IP) from a different ...
3
votes
3answers
2k views

/etc/hosts file syntax. Is it possible to set one IP for a zone?

I would like to set one IP for a zone (livejournal.com) currently I am having to directly type the subdomains like: 11.11.11.11 sub1.livejournal.com 11.11.11.11 sub2.livejournal.com 11.11.11.11 ...
3
votes
2answers
183 views

How to host a website on personal computer

I want to start hosting my website at my own computer as well websites of my friends too (say mini hosting platform). I learned Debian, Bind9 and Apache for this purpose. On my system everything is ...
3
votes
4answers
498 views

How can I improve nscd's cache hit rate?

My Goal: Let nscd maintain a fairly large DNS cache in excess memory since I have it available. Description: I have a webserver that has a broadly dispersed but high-repeat user base. It has plenty ...
3
votes
4answers
3k views

How to set DNS resolver in Fedora using network-manager?

I want to try out Google public DNS. For this I need to change the nameserver address. I know it's in the file /etc/resolv.conf, but whenever I start network-manager, it overwrites the values in that ...
3
votes
5answers
2k views

Why do all my DNS queries resolve to 192.168.1.251?

All my queries on one machine on my network have suddenly started to resolve to 192.168.1.251. This machine was used as the DNS server by other machines, so I noticed it as soon as it started ...
3
votes
1answer
81 views

Local DNS Server Refuses to Ask itself for DNS

I am running Debian 7 and have set up a DHCP and DNS server. Everything is working nicely, except for the server itself not following the DNS entries in BIND. The problem is that /etc/resolv.conf is ...
3
votes
1answer
144 views

Apache Request Hangs For 2 Minutes Exactly

I am experiencing some odd behavior with apache. I have requests that are hanging for exactly two minutes. The request could be one file one time, and then a completely different file another time. ...
3
votes
1answer
160 views

How to skip DNS checkup while I'm disconnected from Internet

I use RedHat machine. /etc/resolve.conf was set to nameserver 8.8.8.8 and it works well. I'm wondering how to connect my machine if it's disconnected from internet? It seems that if DNS of 8.8.8.8 is ...
3
votes
1answer
2k views

Skype connects to the internet but all my web browsers can't on Fedora 15

I've recently taken the plunge and gone from Ubuntu to Fedora. When connected to my wireless network my web browsers can't access any sites although skype works fine. I don't have the problem when ...
3
votes
1answer
234 views

Bind9 — How to find which programs are making which dns lookups?

Using bind9 on a laptop shows lots of nonsense domains when network connectivity is down: Oct 18 19:56:18 lap3 named[1536]: error (network unreachable) resolving './NS/IN': 128.63.2.53#53 Oct 18 ...
3
votes
1answer
83 views

Two DNS servers, both incomplete

In my company we have 2 DNS servers: one for the internal hostnames and one for Internet. I tried to configure both in my Network Manager, who result in having the two DNS server IPs in my ...