hosts
This commit is contained in:
parent
95ea2899ea
commit
9e441e1aaf
11 changed files with 172 additions and 1 deletions
26
system/networking.nix
Normal file
26
system/networking.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{conf, ...}: {
|
||||
networking.hostName = conf.hostname;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
wifi.macAddress = "random";
|
||||
ethernet.macAddress = "random";
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
allowedTCPPorts = [
|
||||
22 # ssh
|
||||
22000 # syncthing
|
||||
];
|
||||
|
||||
extraCommands = ''
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue