# FreeBSD 9, disable ipv6



## DD (Jan 19, 2012)

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.


----------



## SirDice (Jan 19, 2012)

Not sure if this is correct, the settings changed a lot compared to 8.x and I'm still adjusting myself.

/etc/rc.conf:

```
ipv6_network_interfaces="none"    # Default is auto
ipv6_activate_all_interfaces="NO" # this is the default
```


----------



## DD (Jan 19, 2012)

SirDice said:
			
		

> Not sure if this is correct, the settings changed a lot compared to 8.x and I'm still adjusting myself.
> 
> /etc/rc.conf:
> 
> ...



I've already tried that, it doesn't do the trick.


----------



## DD (Jan 19, 2012)

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.


----------



## SirDice (Jan 19, 2012)

DD said:
			
		

> Anyway, still don't care for the ipv6 stuff.


You should. It won't be long until all IPv4 addresses are completely depleted.


----------



## DD (Jan 19, 2012)

SirDice said:
			
		

> You should. It won't be long until all IPv4 addresses are completely depleted.



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.


----------



## SirDice (Jan 19, 2012)

DD said:
			
		

> And to be totally honest I'm not skilled enough on ipv6 - yet -


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  



> to risk using it in production environment when it's more the superfluous.


Ah, yes, understandable.

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


----------



## DD (Jan 19, 2012)

SirDice said:
			
		

> 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



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.



			
				SirDice said:
			
		

> Ah, yes, understandable.



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


----------



## phoenix (Jan 19, 2012)

`# grep ipv6 /etc/defaults/rc.conf`
Read the comments attached to those, and the rc.conf(5) man page for details.


----------



## DD (Jan 19, 2012)

phoenix said:
			
		

> `# grep ipv6 /etc/defaults/rc.conf`
> Read the comments attached to those, and the rc.conf(5) man page for details.



That's the first thing I did, but I'm sure I missed something.


----------



## bbzz (Jan 19, 2012)

Why not just rebuild kernel without IPv6?


----------



## phoenix (Jan 19, 2012)

This is how we do it on our 9.0 boxes:

```
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".


----------



## Wout (Apr 16, 2012)

DD said:
			
		

> 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.



Setting 
	
	



```
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


----------

