Search code examples
ubuntunetcatubuntu-20.04

Netcat throws a "getnameinfo: Temporary failure in name resolution" error


When I run the following command: nc -luvp 9090, I get the error: getnameinfo: Temporary failure in name resolution

I've scanned the internet in search of an answer, but none of them were valid:

I found this link: https://unix.stackexchange.com/questions/504963/how-to-solve-a-temporary-failure-in-name-resolution-error And tried the most upvoted answer. My results:

netcat_name_resolution_error

I'm using NordVPN, which uses its own DNS servers. But I tried disabling it completely, and I get the same exact result. I'm afraid it messed up with my DNS config file and/or firewall rules.

I'm kinda new to Linux and feel a bit lost.


Solution

  • The problem could be with the DNS resolver. Try updating the namespace in /etc/resolv.conf as follows.

    nameserver 8.8.8.8