sysctl interface settings
This example configures sysctl interface settings:
- enable ip forwarding for all interfaces
- ignore ipv6 router advertisments by default
- accept ipv6 router advertisments on
eth0and generate a private ipv6 address - configure a static ipv6 address on
eth1
{
networking.ifstate = {
enable = true;
settings = {
sysctl.all.ipv6.forwarding = 1;
interfaces = {
eth0 = {
link = {
kind = "physical";
state = "up";
};
sysctl.ipv6 = {
accept_ra = 2;
addr_gen_mode = 3;
};
};
eth1 = {
addresses = [ "2001:db8::defa/64" ];
link = {
kind = "physical";
state = "up";
};
};
};
};
};
}