tin vip vai lon
This commit is contained in:
parent
5760ed4067
commit
4737199992
10 changed files with 148 additions and 110 deletions
50
host/server/networking.nix
Normal file
50
host/server/networking.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedUDPPorts = [
|
||||
53
|
||||
34778
|
||||
];
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
18581
|
||||
8443
|
||||
15523
|
||||
53
|
||||
583
|
||||
25565
|
||||
];
|
||||
};
|
||||
|
||||
useDHCP = false;
|
||||
networkmanager.enable = true;
|
||||
|
||||
defaultGateway = "192.168.1.1";
|
||||
nameservers = [
|
||||
"8.8.8.8"
|
||||
"1.1.1.1"
|
||||
];
|
||||
|
||||
interfaces = {
|
||||
enp1s0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.1.100";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
|
||||
ipv6.addresses = [
|
||||
{
|
||||
address = "2402:800:62d0:1c26:abcd:1234:5678:9abc";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in a new issue