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

learn more… | top users | synonyms

59
votes
12answers
75k 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.
19
votes
6answers
8k 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 ...
18
votes
4answers
16k 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 ...)
15
votes
4answers
19k 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)
13
votes
4answers
19k 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
763 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 ...
11
votes
1answer
3k 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 ...
10
votes
2answers
10k views

How do I set my DNS on Ubuntu 14.04?

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make just get overridden. $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by ...
10
votes
3answers
238 views

Iptables to redirect DNS lookup IP and Port

I have discovered that my ISP (verizon) is intercepting all DNS traffic on port 53. Using iptables, I want to redirect all DNS lookup traffic to a specific IP and Port (5353). Any attempt for my ...
9
votes
2answers
14k 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?
9
votes
1answer
109 views

Can a domain be configured to only have secondary DNS nameserver records?

I'm asking if someone can verify if my DNS hosting idea is possible or has any flaws. We would host our own primary DNS server for all zones and configure it to allow zone transfers to a set of IPs ...
8
votes
5answers
862 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
2answers
82 views

DNS lookups sometimes take 5 seconds

I have a VM running Debian Wheezy on which some hostname lookups take several seconds to complete, even though the resolver replies immediately. Strangely, lookups with getaddrinfo() are affected, ...
7
votes
1answer
9k 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
5answers
13k 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 ...
7
votes
3answers
11k 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 ...
7
votes
1answer
2k 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
7
votes
2answers
1k 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 ...
6
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?
6
votes
1answer
314 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
15k 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
923 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
5answers
18k 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
4k 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
2answers
294 views

How does DNS name resolution work, in principle?

Right now I'm taking an online course for Linux sysadmin and I was asked a question I just generally don't understand. I know how to search for a name server, if I'm correct at least it's using the ...
5
votes
2answers
10k 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 ...
5
votes
2answers
2k 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 ...
5
votes
1answer
156 views

delay to get password prompt when ssh'ing to a public server

i have a server (debian 7) setup in my university with public ip. when I ssh into the system (from outside the campus), I get a weird delay of 5-10 seconds before I get the password prompt. Why is ...
5
votes
1answer
102 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
1answer
131 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 ...
5
votes
1answer
409 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
374 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
826 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
6answers
674 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 ...
4
votes
3answers
177 views

How do I generate SSHFP records?

I need to setup SSHFP records in the DNS for my host. I have done some searching but I haven't found any good example. What are SSHFP records? What does SSHFP records look like? How do I create ...
4
votes
2answers
4k 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
9k 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
318 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
317 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
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
3k 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
5k 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
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
146 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
3answers
28k views

How to flush local DNS cache in CentOS

(I am aware that googling this question gives me tons of stuff, but literally none worked) I'm looking for a way to flush the local DNS cache on a Centos 6 system, it is not running any DNS server or ...
4
votes
1answer
359 views

Setup of DNS zone with secure zone updates

How do I run a dns server with a zone for a local domain and be able to add dynamic entries to the dns zone securely from selected hosts? I have tried to setup a domain 'rag.local' with bind9. I have ...
4
votes
1answer
24 views

route added, but shows inverse ip

Using xubuntu... i'm trying to add a route in my work laptop, and so i do route add -host 212.18.178.207 gw 10.15.228.1 eth0 for some strange reason, when i do just route, this is what i get... ...
4
votes
2answers
66 views

Port Routing/DNS for individual program

Background Flickr has closed its http api leaving an https only api. My favourite uploader (the official Flickr Uploadr version 2.5 running under wine) is no longer maintained, so this change broke ...
4
votes
1answer
860 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 ...
4
votes
2answers
497 views

BIND9 as a DNS server refuses requests

I am trying to set up a DNS server on Amazon Linux using BIND9. It has to act as a master nameserver for a lot of domains. I have imported all of the DNS zone files using NamedManager (a web ...