Questions tagged [dns]

Domain Name System (DNS) is a service that provides the resolution of host names to IP addresses. Use the [tag:dns] tag when you are troubleshooting DNS issues, configuring a DNS resolver or server, or are trying to understand DNS's involvement in your situation.

Filter by
Sorted by
Tagged with
417
votes
26answers
569k 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.
279
votes
17answers
841k views

How do I set my DNS when resolv.conf is being overwritten?

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

Configure BIND as Forwarder only (no root hints), encrypted + RPZ blacklist / whitelist all together

My setup is getting more complex, generally I tend to divide things in pieces and assemble them together by myself. But it seems this time I need more help to get the whole gears working together. ...
1
vote
2answers
4k views

resolving DNS via Tor

When I am using Tor, and not using the Tor bundle there is a possibility of DNS leaks in certain situations. What can be done to minimize it? Is it possible to resolve DNS via Tor?
4
votes
1answer
5k views

Large zone file for bind9 : ad-blocking

I was successfully using a small (20,000 entries) zone file with bind9 server, but today my data provider sent an update which caused the zone file to become 300,000+ entries large (30Mb+). The ...
250
votes
13answers
684k 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)
24
votes
2answers
27k views

How to configure systemd-resolved and systemd-networkd to use local DNS server for resolving local domains and remote DNS server for remote domains?

I'm connected to local area network with access to the Internet through gateway. There is DNS server in local network which is capable of resolving hostnames of computers from local network. I would ...
5
votes
3answers
3k views

How to stop dhclient from updating resolvconf on Debian?

I want to use certain DNS servers regardless of whatever I get through DHCP. I'm trying to configure dhclient to ignore those, but I can't seem to get it to work. Per advice from this article I added ...
2
votes
1answer
4k views

Static IP address shifting to 192.168.1.251

I have a system with a static IP address of 192.168.1.150. I configured /etc/network/interfaces manually (i.e. without using NetworkManager.) It is a web server hosting three sites. I am having ...
88
votes
1answer
20k views

Chrome: DNS requests with random DNS names: malware?

Over the years (since 2005), I have seen logs of strange random DNS requests done, on the multiple DNS / BIND servers I have maintained. May 7 12:13:50 1.1.1.1 named[63742]: client 1.1.1.2#24123 (...
48
votes
2answers
38k views

How to troubleshoot DNS with systemd-resolved?

How would you go about finding the DNS servers used by systemd-resolved, for troubleshooting purposes? Generally I can use dig and test the DNS servers shown in /etc/resolv.conf. (Or windows - ...
38
votes
5answers
19k 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 SSHFP ...
20
votes
3answers
21k views

What is the purpose of /etc/hosts?

As I understand it, the hosts file is one of several system facilities that assists in addressing network nodes in a computer network. But what should be inside it? When I install Ubuntu by default ...
19
votes
6answers
12k 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
2k views

Incoming/Outgoing seperation for VPN

My situation is that I want all my outgoing connections from my Debian server to pass through a commercial VPN service I've subscribed to, but I still want to run public-accessible services on this ...
27
votes
1answer
5k views

Why does Chromium not cache DNS for more than a minute?

I use Chromium and have problems with the DNS not being cached for the time that I would expect. Take the example.com domain. According to the DNS settings, this domain should be cached for another ...
14
votes
1answer
43k views

No domain defined in /etc/resolv.conf

I see more and more servers that have no domain defined in the /etc/resolv.conf file. Only a search entry. In what cases is this setup used ? Are there any cases where it must not be used ? ...
10
votes
2answers
10k 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, ...
6
votes
2answers
5k views

Get the external IP address in shell without dig in 2016?

This question: "How can I get my external IP address in bash?" Solves the question with a call to dig: dig +short myip.opendns.com @resolver1.opendns.com; that is the fastest resolution possible, ...
5
votes
1answer
30k views

How can I check if my DNS server is working?

This case scenario is for a router with embedded linux, but I think the answer could be the same for any Linux system. This is my DNS check: ~ $ cat /etc/resolv.conf nameserver 80.58.61.250 ...
3
votes
2answers
2k views

How can I Forward a subDomain to a specific port?

My apologies if this has been asked before. I haven't found an adequate solution so... yeah. When a specific domain, "example.com" is accessed, I want it to act normally. In other words, it should go ...
2
votes
1answer
1k views

How to resolve a hostname via nsswitch?

I want to test in a script whether a hostname resolves to something other than 127.0.0.1 as a pre-flight test for an install script. The tools I know (dig, nslookup) specifically query DNS. In my ...
4
votes
1answer
2k views

How do I figure out where wrong local dns results are coming from?

I'm running mint Mate 17.2. When I use dig, for a certain specific domain name, the resolved IP "answer" is wrong, and the answer server is 127.0.0.1. Trying to access this domain from my local ...
2
votes
1answer
994 views

How to reorder /etc/resolv.conf at load time [duplicate]

I have a CentOS system that retrieves its upstream DNS servers via DHCP. I want to run DNSMasq on this box and use it as a server to resolve some hostnames for development. The problem is when my ...
2
votes
1answer
2k views

Use dnsmasq to pushing routes to my clients on a small local network

I'm trying to use dnsmasq to pushing routes to my clients on a small local network. However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not ...
1
vote
2answers
1k views

can ping google dns, but not google.de -> unknown host // worked in another network

I have a Laptop with debian jessie installed. At my home network, i could connect successfully to the internet (ping google.de successful). At the external network, i can't ping google.de (result: ...
0
votes
1answer
200 views

SSH takes too long to ask for password

I've seen many other questions on this subject but none seem to actually solve my problem. Like any other day, I connect to my LOCAL Raspberry Pi server from my client machine at 192.168.0.5 with ssh ...
78
votes
5answers
89k 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 ...)
21
votes
5answers
57k 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
40k views

I can ping IPs but can't resolve domains

I have Xubuntu 14.04 installed on my server. network-manager is not installed. It seems to have lost its ability to resolve domains, and I'm not sure where to begin diagnosing the issue. ping 8.8.8.8 ...
6
votes
5answers
10k 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 ...
18
votes
1answer
26k 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
16
votes
2answers
35k views

Blocking Websites with /etc/hosts

There's a website, www.example.com, that I tried to block myself from accessing because it wastes too much of my time. So I configured my /etc/hosts file. I added the following lines, to block the ...
15
votes
5answers
68k 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 ...
10
votes
2answers
19k views

avahi-daemon and “.local” domain issues

I have a Ubuntu 16.04 based HTPC/Media Server that's running 24/7. As far as I can remember using an official Ubuntu distro, I've always had issues with the avahi-daemon. The issue is pretty often ...
8
votes
2answers
23k 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 ...
2
votes
1answer
1k views

What are DNS server, resolver and stub resolver?

https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#Description says Additionally, systemd-resolved provides a local DNS stub listener on IP address 127.0.0.53 on the ...
1
vote
1answer
3k views

How to setup DNS manually on Linux?

In Linux /etc/resolv.conf get often overwritten when we setup the DNS, because of the multitude of programs managing the DNS servers. How to properly setup the DNS ?
11
votes
3answers
40k views

No DNS resolution after upgrade from ubuntu 14.04 to 16.04

I upgraded ubuntu 14.04 to ubuntu 16.04 and I have a problem with the internet connection. Specifically, DNS after update stopped working. For debugging purposes I set the only DNS 8.8.8.8, but name ...
6
votes
2answers
499 views

What overwrites /etc/resolv.conf roughly every hour?

I'm trying to add a search line to /etc/resolv.conf I've added it directly, as an append command in /etc/dhcp/dhclient.conf and as a nameservers block in /etc/netplan/50-cloud-init.yaml. After ...
6
votes
4answers
12k views

OpenConnect not resolving hostnames

I'm running LMDE 17, and I've installed OpenConnect v6 and the repository version of network-manager-openconnect. Everything is peachy, except any address for the domain companyname.local doesn't ...
14
votes
6answers
26k views

Busybox ping IP works, but hostname nslookup fails with “bad address”

I am compiling my own 3.14 kernel. I fear I may have left out some important networking feature to get DNS working. I can't resolve domain names. I can ping my DNS server. I can resolve using that ...
14
votes
2answers
46k views

apache won't restart after adding VirtualHost conf file, why not?

In a CentOS 7 server, I get the following error when I type sudo apachectl restart after I add an include file at the bottom of httpd.conf: Job for httpd.service failed. See 'systemctl status httpd....
11
votes
3answers
1k 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 need ...
7
votes
5answers
50k 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 ...
7
votes
3answers
23k views

debian, problem with DNS

When I type in "google.com," firefox tells me that the server is not found. When I type in the IP address of google, it works just fine. I was playing with this computer at another place and it didn'...
5
votes
1answer
6k views

Run SSH over a SOCKS proxy?

I need VPN-like behavior locally, without using a VPN. I've created a SOCKS proxy to a given server which is reachable from the WAN, and I want all of my traffic forwarded through that proxy so I ...
4
votes
3answers
40k views

How to flush the DNS cache in Debian?

How can I flush the DNS cache in Debian 9.1 with KDE?
3
votes
1answer
3k views

DNS query response logging

I have configured a CC TLD with bind9. I have successfully configured query logging also. But I can not do logging of query responses. Please have a look of what I have configured for query logging: ...
16
votes
3answers
3k views

Who reads /etc/resolv.conf?

My Centos 7 server doesn't resolve domain names properly. From what I see, in modern Linux systems /etc/resolv.conf is often generated with dhclient, dnsmasq or Network Manager. Thus I have a ...