Ipv6 not working

When I do wget, it hangs

i.e.

 wget -v https://gems.hashicorp.com/specs.4.8.gz                                                                                                                                                                           ✔ 
--2021-09-24 23:41:44--  https://gems.hashicorp.com/specs.4.8.gz
SSL_INIT
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving gems.hashicorp.com (gems.hashicorp.com)... 2600:9000:21d1:2400:11:a45a:acc0:93a1, 2600:9000:21d1:3800:11:a45a:acc0:93a1, 2600:9000:21d1:1800:11:a45a:acc0:93a1, ...
Connecting to gems.hashicorp.com (gems.hashicorp.com)|2600:9000:21d1:2400:11:a45a:acc0:93a1|:443... ^C

If i force ipv4, it seems to work

wget -v -4 https://gems.hashicorp.com/specs.4.8.gz                                                                                                                                                         INT ✘  2m 45s  
--2021-09-24 23:46:23--  https://gems.hashicorp.com/specs.4.8.gz
SSL_INIT
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving gems.hashicorp.com (gems.hashicorp.com)... 13.226.69.35, 13.226.69.102, 13.226.69.96, ...
Connecting to gems.hashicorp.com (gems.hashicorp.com)|13.226.69.35|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 424 [binary/octet-stream]
Saving to: ‘specs.4.8.gz’

specs.4.8.gz                                               100%[========================================================================================================================================>]     424  --.-KB/s    in 0s      

2021-09-24 23:46:24 (6.36 MB/s) - ‘specs.4.8.gz’ saved [424/424]

This seems to be causing issues with other applications (like my vagrant)

vagrant up                                                                                                                                                                      ✔ 
Installing plugin vagrant-bindfs
Vagrant failed to initialize at a very early stage:

Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:

  timed out (https://gems.hashicorp.com/specs.4.8.gz)

Source: https://gems.hashicorp.com/

How do i force all network connections to use ipv4 only?

Thanks

You can:

  • disable IPV6 in your router config

  • You can disable via GRUB as follows:

    • Execute:

      sudo nano --backup /etc/default/grub
      
    • Search for the line containing:

      GRUB_CMDLINE_LINUX=
      
    • before the last " on that line, add a space and copy-paste this after the space, before the quotiation mark:

      ipv6.disable=1
      
    • Ctrl+X Enter Y to save

    • Execute:

      sudo update-grub
      
    • reboot

  • You can also disable IPV6 in the individual Network Manager configurations.

:+1:

1 Like

I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back to your question after your issue has been solved and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.