
을 사용하여 openssl s_client
연결을 요청 하면 실제로 는 가 아닌 ip6-localhost
에 연결됩니다 .127.0.0.1
::1
이것이 내가 우분투와 데비안에서 본 것입니다:
$ strace -e connect openssl s_client -connect ip6-localhost:443
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
/etc/hosts
이 동작을 설명하는 내용이 표시되지 않습니다 .
127.0.0.1 localhost
127.0.1.1 dell
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
IP 주소가 다음과 같다고 결론을 내리는 방법은 무엇입니까 s_client
?ip6-localhost
127.0.0.1