From 2d7483e6fe602bc991462797506223c447168e09 Mon Sep 17 00:00:00 2001 From: clerie Date: Sat, 28 Aug 2021 18:01:49 +0200 Subject: [PATCH] Use DSL now --- hosts/carbon/configuration.nix | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix index 8391e6c..de77a6e 100644 --- a/hosts/carbon/configuration.nix +++ b/hosts/carbon/configuration.nix @@ -33,8 +33,8 @@ ]; # Network ## DSL-Uplink - networking.vlans."enp1s0.101" = { - id = 101; + networking.vlans."enp1s0.7" = { + id = 7; interface = "enp1s0"; }; ## LTE-Uplink @@ -42,7 +42,6 @@ id = 102; interface = "enp1s0"; }; - networking.interfaces."enp1s0.102".useDHCP = true; ## Heimnetz networking.vlans."enp1s0.201" = { id = 201; @@ -70,7 +69,7 @@ networking.nat = { enableIPv6 = true; enable = true; - externalInterface = "enp1s0.102"; + externalInterface = "ppp-ntvdsl"; internalIPv6s = [ "fd00:152:152::/48" "fd00:3214:9453:4920::/64"]; internalIPs = [ "10.152.0.0/16" "192.168.32.0/24" ]; }; @@ -122,6 +121,26 @@ iptables -A FORWARD -o enp1s0.202 -j DROP ''; + services.pppd = { + enable = true; + peers.ntvdsl = { + config = '' + plugin rp-pppoe.so enp1s0.7 + user "dsl-31997-001#regio@bsa-vdsl" + ifname ppp-ntvdsl + persist + maxfail 0 + holdoff 5 + noipdefault + mtu 1492 + hide-password + defaultroute + +ipv6 + ''; + }; + }; + + # Routing tables # Table: 10000 # - primary routes