s_clientはip6-localhostを127.0.0.1にどのように変更しますか?

s_clientはip6-localhostを127.0.0.1にどのように変更しますか?

を使用してopenssl s_client接続を要求すると、実際にはではなくにip6-localhost接続されます。127.0.0.1::1

これは私がUbuntuとDebianで見たものです:

$ 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_clientip6-localhost127.0.0.1

ベストアンサー1

おすすめ記事