Skip to main content
Share Your Experience: Take the 2024 Developer Survey
8 votes
Accepted

How to parse strace recvfrom syscall?

recvfrom(2) is documented like this (using a Linux man page below): ssize_t recvfrom(int sockfd, void buf[restrict .len], size_t len, int flags, struct ...
A.B's user avatar
  • 37k
5 votes

How can I ping my Linux system by name without manually typing hosts files?

Systems communicate with each other with IP-addresses, not with hostnames. So, your computer needs to translate your hostname into an IP address. Three common ways to do this are: host file (/etc/...
Ljm Dullaart's user avatar
  • 4,768
4 votes
Accepted

Why do I get different browser behaviour when attempting to reach bitcoin.stackexchange.com and the alias of its IP in /etc/hosts?

Yes, your browser well send a Host header, and in the case of HTTPS access, additonally use SNI, to tell the server which site it wants to access. This is of course nothing unusual - a single server ...
muru's user avatar
  • 73.2k
4 votes
Accepted

Weird init process listening on TCP port 53, LinuxMint Victoria

On Linux using netstat should be replaced by using ss, because it provides more information. For this case it provides all processes sharing the socket, while netstat stops at the first. There are ...
A.B's user avatar
  • 37k
4 votes
Accepted

How do I permanently configure the DNS resolution in Ubuntu for ALL programs/layers for specific interfaces

You haven't indicated if this is a Desktop or Server installation. Either way, I'll try to explain. First, let's look at the contents of /etc/resolv.conf: nameserver 127.0.0.53 options edns0 trust-ad ...
mpboden's user avatar
  • 156
4 votes

getaddrinfo doesn't return IPv6 on Linux, but does on Macbook

I was a little surprised by MacOS behaviour here as Linux behaviour seems a bit more intuitive. Linux itself doesn't handle DNS, that's actually user space libraries such as glibc (I note you tagged ...
Philip Couling's user avatar
3 votes
Accepted

Is checking /etc/hosts and /etc/resolv.conf sufficient to know that no server is trying to falsely represent itself as another?

There's nothing you can do if some other party has the root privileges to modify name resolution. That means they can already mess with all your software. You've lost. Nothing you can do on your ...
Marcus Müller's user avatar
3 votes

How can I resolve JUST hostnames under the VPN's domain on the VPN's resolver, while retaining the default resolver

Assuming that vpn0 is the name of your VPN tunnel interface, you could configure your dnsmasq with: --server=/lan/192.168.2.1@vpn0 With this configuration line/option, if the vpn0 interface exists, ...
telcoM's user avatar
  • 98.1k
2 votes

How can "Enter a correctly formatted URL" in chrome's DNS setting?

Chrome requires a DoH (DNS over HTTPS) endpoint here. For example, for Cloudflare resolver this would be https://cloudflare-dns.com/dns-query
igor's user avatar
  • 121
1 vote
Accepted

Bind: Delegating a Subdomain With Its Own SOA

Typically I do sub-zones in a separate file. e.g. in named.conf I might have zone "example.org" { type master; file "example.org"; }; zone "subzone.example.org" { ...
Stephen Harris's user avatar
1 vote
Accepted

Recofiguring DNS/DHCP: a bit of advice?

Unless systems need to operate without a functioning DNS service (for example, when one is a DNS server) it's generally a good idea to leave them assigned through DHCP. This gives you a single point ...
Chris Davies's user avatar
1 vote

Why is Google DNS server not returning authoritative answer for itself

Thanks to @muru's comment, the reason it doesn't work is because 8.8.8.8 and 8.8.4.4 (dns.google.com) are not authoritative name servers. Authoritative name servers can be obtained for a domain by ...
mvanle's user avatar
  • 335
1 vote
Accepted

Is it safe to add CloudFlare nameservers to a VPS?

nameserver 1.1.1.1 nameserver 127.0.0.53 Will I lose my SSH access to this server? Changing name servers will not break established SSH connections. New SSH connections will only be impacted if you ...
HBruijn's user avatar
  • 7,448
1 vote
Accepted

What is the difference between host and domain in dig?

I think this is just a bug in the description introduced by a refactoring done 23 years ago. The help text went from the grammatically correct: "Usage: dig [@server] [domain] [q-type] [q-class] {...
muru's user avatar
  • 73.2k
1 vote
Accepted

How to get systemd to not override DNS settings for a network interface?

I found a solution to this. I'm also running NetworkManager, and it looks like it was overriding the DNS settings for that interface. Editing the DNS settings in nmtui and setting Ignore automatically ...
vluzko's user avatar
  • 121
1 vote

Can't resolve domain names after upgrading to Debian 12

The connection.dns-over-tls setting is new to Debian 12. As far as I understand, the value "default" (-1) has a meaning that depends on which resolver library you're using. I don't think the ...
telcoM's user avatar
  • 98.1k
1 vote
Accepted

How to use DNS-over-TLS with BIND9 forwarders

As this is the top hit on Google for configuring BIND9 to forward via DNS-over-TLS, here's how I've configured and tested on BIND 9.19.13, connecting to OpenDNS. I created a named.conf.dot in /etc/...
esowash's user avatar
  • 26
1 vote
Accepted

Why would curl fail to resolve a URL when drill can?

It turned out that the laptop was running systemd-resolved. I was surprised by this, because: There was nothing in nsswitch.conf There was nothing in resolv.conf dnscrypt-proxy.service was installed ...
Bagalaw's user avatar
  • 945
1 vote
Accepted

short name a domain name

Just store the address in a variable and then you can ping that: $ foo=unix.stackexchange.com $ ping "$foo" PING unix.stackexchange.com (104.18.43.226) 56(84) bytes of data. 64 bytes from ...
terdon's user avatar
  • 243k
1 vote
Accepted

Active directory server set up DNS resolution failure or VERY SLOW, can I route external DNS requests the traditional way, before the server existed?

The windows clients are configured in dns settings to use the ADDC as their preferred dns server (if I change this, then they lose connection to the domain and can't find it...) and use 8.8.8.8 google'...
Chris Davies's user avatar
1 vote
Accepted

Fedora 38: need persistent changes in nsswitch.conf

On Fedora 38 it's /etc/authselect/nsswitch.conf instead of /etc/authselect/user-nsswitch.conf and it's content is the same as regular /etc/nsswitch.conf. Then authselect apply-change will generate /...
admstg's user avatar
  • 734
1 vote
Accepted

Name Server Daemon (NSD), possible to use PostgresQL/MARIADB as backend for DNS zone data?

No, such complexity was explicitly not a design goal of NSD. I've had a quick look at NSD's source code (haven't looked at that in ages, thanks for reminding me of it), and all you'd have to implement ...
Marcus Müller's user avatar
1 vote

Question on encrypted DNS over Quic? How is it encrypted?

QUIC is transport layer encryption, not query encryption. It is similar to DNS over HTTPS or DNS over TLS, in that the connection to the configured (usually recursive) DNS server is encrypted. How ...
Steffen Ullrich's user avatar
1 vote

Keep getting NS record query failed: NXDOMAIN on Kali Linux dnsenum commands

The Kali Linux tool dnsenum takes a domain name as an operand, as shown in the Kali Linux documentation for the tool: dnsenum --noreverse -o mydomain.xml example.com In your question, you appear to ...
Kusalananda's user avatar
  • 337k
1 vote

Is checking /etc/hosts and /etc/resolv.conf sufficient to know that no server is trying to falsely represent itself as another?

You can try to change the attribute of the file became immutable using chattr linux command. This some sample of using chattr command. [root@my-server ~]# lsattr /etc/hosts -------------e- /etc/hosts [...
Iyus Dedi Putra's user avatar
1 vote

Where should I configure DNS in Debian 11?

You can also configure dhclient to prepend your DNS nameserver list without installing additional services. Add this line to /etc/dhcp/dhclient.conf prepend domain-name-servers 1.1.1.1, 1.1.0.0, 8.8.8....
Dan's user avatar
  • 193
1 vote
Accepted

is there a way to download all of the DNS records from PowerDNS?

you may have a chance to do so if you can grab the zone files that your powerdns is serving. With the zone name you can ask some AXFR to list all the data, of simply parse the zone files.
dominix's user avatar
  • 655
1 vote

How to disable ip6 lookups in unbound?

You can filter out all responses containing AAAA records as follows: server: private-address: ::/0 # filters out all AAAA
Igor Ostrovsky's user avatar
1 vote

Bulk Reverse DNS query with DIG

The reason your original code didn't work is because the -x needs to be included in each line of data read from the file. This is documented in the man page, but I personally think it could be clearer:...
Chris Davies's user avatar
1 vote

Resolving hostname takes 5 seconds

This issue was resolved for me after starting to use systemd-resolved. See https://wiki.archlinux.org/title/systemd-resolved
PSanetra's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible