When performing IPv6 connect with nc command, why it fails to try IPv4 as well if IPv6 method fails in RHEL7?
Issue
- We note that when
nc
performs IPv6 connect it does not try IPv4 as well:
$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
- This seems to be a buggy behavior. If IPv6 fails,
nc
should try the IPv4 method. nc
performs IPv6 connect but doesn't try IPv4 as well.
Environment
- Red Hat Enterprise Linux (RHEL) 7.
- Nmap packages.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.