Networking: Difference between revisions
Update link aggregation section |
|||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
== Configuration == | == Configuration == | ||
=== Wireless networks === | |||
See [[wpa_supplicant]] / [[Iwd]]. | |||
=== Static IP for network adapter === | === Static IP for network adapter === | ||
| Line 114: | Line 118: | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Virtualization === | |||
Sometimes complex network configurations with VPNs or firewall rules you may need extra configurations in order for your VMs to have network access. It is recommended to use more granular control over the ports instead of simply allowing the entire interface.<syntaxhighlight lang="nix">networking = { | |||
firewall = { | |||
enable = true; | |||
# Allows the entire interface through the firewall. | |||
# trustedInterfaces = [ | |||
# "virbr0" | |||
# ]; | |||
# Allows individual ports through the firewall. | |||
interfaces = { | |||
virbr0 = { | |||
allowedUDPPorts = [ | |||
# DNS | |||
53 | |||
# DHCP | |||
67 | |||
# You may want to allow more ports such as ipv6 and other services here. | |||
]; | |||
}; | |||
}; | |||
}; | |||
nat = { | |||
enable = true; | |||
internalInterfaces = [ | |||
"virbr0" | |||
]; | |||
}; | |||
};</syntaxhighlight> | |||
== IPv6 == | == IPv6 == | ||
| Line 325: | Line 361: | ||
=== Teaming === | === Teaming === | ||
Using the teaming driver provides more configuration capabilities since more descision-making is done in userspace <ref>https:// | Using the teaming driver provides more configuration capabilities since more descision-making is done in userspace <ref>https://github.com/jpirko/libteam/wiki/Bonding-vs.-Team-features</ref>. | ||
{{Expansion|Missing information about teaming.}} | {{Expansion|Missing information about teaming.}} | ||