Networkd ipv6
This commit is contained in:
parent
9c006a3519
commit
6e94647d8e
1 changed files with 18 additions and 11 deletions
|
@ -5,9 +5,26 @@ let mkAddress = addr: let
|
||||||
in
|
in
|
||||||
{ address = (elemAt 0); prefixLength = lib.toInt (elemAt 1); };
|
{ address = (elemAt 0); prefixLength = lib.toInt (elemAt 1); };
|
||||||
in {
|
in {
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
networks."ens18" = {
|
||||||
|
DHCP = "no";
|
||||||
|
addresses = [
|
||||||
|
{ addressConfig.Address = "2001:470:1f13:187:c08e:feff:fe4d:f5f5"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "public-cof";
|
hostName = "public-cof";
|
||||||
|
useNetworkd = true;
|
||||||
|
|
||||||
|
useDHCP = false;
|
||||||
|
|
||||||
|
firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
firewall.enable = true;
|
||||||
|
|
||||||
|
/*
|
||||||
# Default IPv4 exit route
|
# Default IPv4 exit route
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "";
|
address = "";
|
||||||
|
@ -15,14 +32,6 @@ in {
|
||||||
};
|
};
|
||||||
localCommands = "ip route add default dev ens20 metric 10";
|
localCommands = "ip route add default dev ens20 metric 10";
|
||||||
|
|
||||||
useDHCP = false;
|
|
||||||
interfaces.ens18 = {
|
|
||||||
useDHCP = true;
|
|
||||||
ipv6.addresses = [{
|
|
||||||
address = "2001:470:1f13:187:c08e:feff:fe4d:f5f5";
|
|
||||||
prefixLength = 64;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
interfaces.ens19 = {
|
interfaces.ens19 = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [{
|
||||||
|
@ -36,9 +45,7 @@ in {
|
||||||
# 2nd is for IPv4 → IPv6 proxy in v6proxy/
|
# 2nd is for IPv4 → IPv6 proxy in v6proxy/
|
||||||
ipv4.addresses = map mkAddress [ "45.13.104.27/32" "45.13.104.29/32" ];
|
ipv4.addresses = map mkAddress [ "45.13.104.27/32" "45.13.104.29/32" ];
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
firewall.allowedTCPPorts = [ 22 ];
|
|
||||||
firewall.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.defaultListenAddresses = [ "[::0]" "45.13.104.27" ];
|
services.nginx.defaultListenAddresses = [ "[::0]" "45.13.104.27" ];
|
||||||
|
|
Loading…
Reference in a new issue