
ipv6 주소가 없는 서버에 cURL 요청을 해야 하는데 내 컴퓨터는 1) https를 사용하고 2) ipv6을 사용하는 경우에만 연결할 수 있는 것 같습니다. 다른 요청은 DNS 확인 후 연결이 설정되기 전에 무기한 중단됩니다.
이 문제를 해결하는 방법에 대한 지침을 주시면 감사하겠습니다.
머신은 컬 7.58.0 및 ufw 0.36이 포함된 Ubuntu 18.04.4를 실행 중입니다.
이는 모든 도메인에서 발생하지만 다음은 google.com의 몇 가지 예입니다.
me@myserver:/$ curl -I4 http://www.google.com --trace-ascii /dev/stdout --no-tcp-nodelay
== Info: Rebuilt URL to: http://www.google.com/
== Info: Trying 142.251.40.100...
*hangs*
me@myserver:/$ curl -I4 https://www.google.com --trace-ascii /dev/stdout --no-tcp-nodelay
== Info: Rebuilt URL to: https://www.google.com/
== Info: Trying 142.251.40.100...
*hangs*
me@myserver:/$ curl -I6 http://www.google.com --trace-ascii /dev/stdout --no-tcp-nodelay
== Info: Rebuilt URL to: http://www.google.com/
== Info: Trying 2607:f8b0:4006:81f::2004...
*hangs*
me@myserver:/$ curl -I6 https://www.google.com --trace-ascii /dev/stdout --no-tcp-nodelay
== Info: Rebuilt URL to: https://www.google.com/
== Info: Trying 2607:f8b0:4006:81f::2004...
== Info: Connected to www.google.com (2607:f8b0:4006:81f::2004) port 443 (#0)
*no problems*
UFW에서 IP 화이트리스트를 시도했지만 도움이 되지 않습니다:
me@myserver:/$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22 ALLOW IN Anywhere
80 ALLOW IN Anywhere
443 ALLOW IN Anywhere
Anywhere ALLOW IN 142.251.40.100
22 (v6) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
443 (v6) ALLOW IN Anywhere (v6)
머신에서 Ubuntu 18.04.4를 실행 중입니다.
다음은 (부드럽게 재구성된) 출력입니다 curl -V
.
curl 7.58.0 (x86_64-pc-linux-gnu)
libcurl/7.58.0
OpenSSL/1.1.1d
zlib/1.2.11
libidn2/2.3.0
libpsl/0.19.1 (+libidn2/2.0.4)
nghttp2/1.30.0
librtmp/2.3
Release-Date: 2018-01-24
Protocols:
dict file ftp ftps gopher http https
imap imaps ldap ldaps pop3 pop3s
rtmp rtsp smb smbs smtp smtps telnet tftp
Features:
AsynchDNS GSS-API HTTP2 HTTPS-proxy
IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets