vuls: init at 0.27.0
[NixPkgs.git] / nixos / doc / manual / configuration / ipv6-config.section.md
blobb4fe0d759b8ad8bf90dca30654a22400a92cfa41
1 # IPv6 Configuration {#sec-ipv6}
3 IPv6 is enabled by default. Stateless address autoconfiguration is used
4 to automatically assign IPv6 addresses to all interfaces, and Privacy
5 Extensions (RFC 4946) are enabled by default. You can adjust the default
6 for this by setting [](#opt-networking.tempAddresses). This option
7 may be overridden on a per-interface basis by
8 [](#opt-networking.interfaces._name_.tempAddress). You can disable
9 IPv6 support globally by setting:
11 ```nix
13   networking.enableIPv6 = false;
15 ```
17 You can disable IPv6 on a single interface using a normal sysctl (in
18 this example, we use interface `eth0`):
20 ```nix
22   boot.kernel.sysctl."net.ipv6.conf.eth0.disable_ipv6" = true;
24 ```
26 As with IPv4 networking interfaces are automatically configured via
27 DHCPv6. You can configure an interface manually:
29 ```nix
31   networking.interfaces.eth0.ipv6.addresses = [ {
32     address = "fe00:aa:bb:cc::2";
33     prefixLength = 64;
34   } ];
36 ```
38 For configuring a gateway, optionally with explicitly specified
39 interface:
41 ```nix
43   networking.defaultGateway6 = {
44     address = "fe00::1";
45     interface = "enp0s3";
46   };
48 ```
50 See [](#sec-ipv4) for similar examples and additional information.