How to force IPv4 on Ubuntu Desktop 14.04

10,058

The only way to completely disable IPv6 is by blacklisting the kernel module. Put the following line in /etc/modprobe.d/blacklist:

blacklist ipv6

Warning: IPv6 is becoming more important each day and IPv6 support is assumed by more and more software these days, even if you don't use it (yet). Blacklisting the kernel module might break things.

Share:
10,058

Related videos on Youtube

Wargog
Author by

Wargog

Updated on September 18, 2022

Comments

  • Wargog
    Wargog almost 2 years

    I've stripped the desktop from my installation as per my last question, but it is not assigning my server an IPv4 address, there is nothing wrong with my configuration, I just need it to give my server a IPv4 address alongside the IPv6 address so that I can access it from within my network for things like portforwarding. My router does not support port forwarding with an IPv6 address and my other computers within the network can't connect to my server because it lacks an IPv4 address. So in a nutshell I need to make my server assign itself an IPv4 address. My server will not show up in the connected devices of my router until I give it an IPv4 address, which creates a problem. Setting a static IP in /etc/network/interfaces doesn't work, it only makes my server think that it has an IPv4, but the network doesn't recognize it.

    • saiarcot895
      saiarcot895 almost 10 years
      Do you mean that you have an IPv6 address that does not start with fe80?
    • Wargog
      Wargog almost 10 years
      It does start with fe80, just my router doesn't support it and I would prefer to use IPv4
    • saiarcot895
      saiarcot895 almost 10 years
      fe80 is a link-local address. This address cannot be used for routing outside of your local network, and may or may not be used when routing inside of your local network. If you don't see any problems, I wouldn't go to the lengths of disabling IPv6 just so you don't see that address.
    • Wargog
      Wargog almost 10 years
      Well, then how do I make IPv4 show up along it, it lets me connect outside my network but not locally from computers within my network. If you would advise against disabling IPv6 then any tips on re-enabling IPv4?
    • Panther
      Panther almost 10 years
      It is hard to tell from what little you have posted. What makes you feel you do not have an ipv4 address ? Also, we need to see the config file(s) you edited.
    • Wargog
      Wargog almost 10 years
      I don't have an IPv4 address because it doesn't show up on my routers devices or on ifconfig on the shell, what I want here is to get Ubuntu to assign my computer an IPv4 address alongside my IPv6 address so that I can use for programs that don't have support for directly typing in an IPv6 address like PuTTy or my router.
    • Panther
      Panther almost 10 years
      Could be a problem with anything from your configuration to dhcp. Please post the requested information.
    • saiarcot895
      saiarcot895 almost 10 years
      @CommuneCode: According to this page, PuTTy has IPv6 enabled since 0.58.
    • Wargog
      Wargog almost 10 years
      When I tried connecting using PuTTy with the IPv6 it told me the host was not found in the network, and that still creates the issue of me not being able to port forward it because of the lack of an IPv4 address.
    • saiarcot895
      saiarcot895 almost 10 years
      @CommuneCode: Did you try brackets? (e.g. [2001:db8::2])
    • Wargog
      Wargog almost 10 years
      Well, the address my server is showing is fe80::216:76ff:fe44:371d/64, I typed that in brackets and the same error happens, I honestly have no idea how to use IPv6 to which makes 3/4ths of the reason I would like an IPv4 address.
    • saiarcot895
      saiarcot895 almost 10 years
      Try [fe80::216:76ff:fe44:371d]. It may or may not work due to it being a link-local address and requiring additional information (namely, the interface to use).
    • Wargog
      Wargog almost 10 years
      I did that as well, this whole IPv6 thing just seems like a waste of time, I would really just like an IPv4 and not even try to mess with the IPv6 stuff until I really need to in the future.
    • Michael Hampton
      Michael Hampton almost 10 years
      This sounds like a wild goose chase. Instead of trying to "disable" IPv6, you should work on why you aren't getting IPv4 connectivity.
    • Wargog
      Wargog almost 10 years
      That is what I have been asking the whole time, it's fine now though, I've switched to Windows Server because of this whole mess.