Today's article has you using wget with one or the other of IPv4 or IPv6

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,791
Reaction score
10,354
Credits
97,542
The title says it well enough. It's actually pretty easy.


Feedback works.
 


For wget over IPv4 , you can use "-4" argument:

[root@server ~]# wget -4 "google.com"
--2022-07-13 12:30:09-- http://google.com/
Resolving google.com (google.com)... 172.253.115.101, 172.253.115.113, 172.253.115.102, ...
Connecting to google.com (google.com)|172.253.115.101|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2022-07-13 12:30:09-- http://www.google.com/
Resolving www.google.com (www.google.com)... 172.253.122.103, 172.253.122.147, 172.253.122.99, ...
Connecting to www.google.com (www.google.com)|172.253.122.103|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.18’

[ <=> ] 13,974 --.-K/s in 0.002s

2022-07-13 12:30:09 (7.52 MB/s) - ‘index.html.18’ saved [13974]

[root@server ~]#

wget over IPv6, you can use "-6" argument:
[root@server ~]# wget -6 "google.com"
--2022-07-13 12:30:03-- http://google.com/
Resolving google.com (google.com)... 2607:f8b0:4004:c17::8a, 2607:f8b0:4004:c17::71, 2607:f8b0:4004:c17::64, ...
Connecting to google.com (google.com)|2607:f8b0:4004:c17::8a|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2022-07-13 12:30:03-- http://www.google.com/
Resolving www.google.com (www.google.com)... 2607:f8b0:4004:c06::63, 2607:f8b0:4004:c06::69, 2607:f8b0:4004:c06::6a, ...
Connecting to www.google.com (www.google.com)|2607:f8b0:4004:c06::63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.17’

[ <=> ] 14,012 --.-K/s in 0.009s

2022-07-13 12:30:03 (1.51 MB/s) - ‘index.html.17’ saved [14012]

[root@server ~]#
 


Latest posts

Top