1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FreeBSD 9, disable ipv6

Discussion in 'Networking' started by DD, Jan 19, 2012.

  1. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    How can I disable ipv6 on FBSD FreeBSD 9?

    I don't want the link-local on any interface, besides ntpd seems not able to bind the ipv6 addresses giving me error during startup.
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,375
    Likes Received:
    3
    Not sure if this is correct, the settings changed a lot compared to 8.x and I'm still adjusting myself.

    /etc/rc.conf:
    Code:
    ipv6_network_interfaces="none"    # Default is auto
    ipv6_activate_all_interfaces="NO" # this is the default
    
     
  3. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    I've already tried that, it doesn't do the trick.
     
  4. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    The NTPd problem doesn't occur on the other server, so my fault I guess. Even though I did the same thing on both. Only difference is the fist is a virtual machine and the second one "physical". Anyway, still don't care for the ipv6 stuff. If someone knows how to disable it it'd be great.
     
  5. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,375
    Likes Received:
    3
    You should. It won't be long until all IPv4 addresses are completely depleted.
     
  6. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    Those servers won't see any public IP, ever. :)

    And to be totally honest I'm not skilled enough on ipv6 - yet - to risk using it in production environment when it's more the superfluous.
     
  7. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,375
    Likes Received:
    3
    Neither was I but it never hurts to be prepared for the future. It'll also give you an edge over your colleagues as they will scramble to get educated when they're forced to migrate and you already know how it works ;)

    Ah, yes, understandable.

    Slightly offtopic, the 6th of June will be another IPv6 day. http://www.worldipv6day.org/
     
  8. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    Sure but I barely have the time to check on the new FreeBSD release, you know. It's merely a question of having the time to do a bit of studying.

    And you know what? I'll stick with the 8.2 for now.
     
  9. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,407
    Likes Received:
    1
    # grep ipv6 /etc/defaults/rc.conf
    Read the comments attached to those, and the rc.conf(5) man page for details.
     
  10. DD

    DD New Member

    Messages:
    6
    Likes Received:
    0
    That's the first thing I did, but I'm sure I missed something.
     
  11. bbzz

    bbzz New Member

    Messages:
    867
    Likes Received:
    0
    Why not just rebuild kernel without IPv6?
     
  12. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,407
    Likes Received:
    1
    This is how we do it on our 9.0 boxes:
    Code:
    ip6addrctl_enable="NO"                  # New way to disable IPv6 support
    ip6addrctl_policy="ipv4_prefer"         # Use IPv4 instead of IPv6
    ipv6_activate_all_interfaces="NO"       # Do not automatically add IPv6 addresses
    
    Guess you have to search for "ip6" as well as "ipv6".
     
  13. Wout

    Wout New Member

    Messages:
    11
    Likes Received:
    0
    Setting
    Code:
    ifconfig_bge0_ipv6="inet6 auto_linklocal"
    in rc.conf (change bge0 to your interface) has fixed the ntpd warnings for me (9.0-RELEASE).

    I would suggest NOT disabling the link-local IPv6 address when using a kernel with IPv6 support (GENERIC does), because this may result in unexpected behaviors of the kernel (see ifconfig(8) BUGS section). Even if you do not use IPv6 yet, you will eventually ;)