From bf7ba926d9f2eb02dd720cf08e51a2e71545172b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 16 Jun 2015 20:41:12 +0200 Subject: =?UTF-8?q?Proxy-ARP=20=E2=86=92=20NAT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bragi.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bragi.nix') diff --git a/bragi.nix b/bragi.nix index acb48081..6246c9b3 100644 --- a/bragi.nix +++ b/bragi.nix @@ -163,17 +163,22 @@ ''; networking.interfaces = { - "wlp4s0" = { - proxyARP = true; - }; "enp1s0" = { - proxyARP = true; useDHCP = false; ipAddress = "10.141.4.1"; prefixLength = 24; }; }; + networking.nat = { + enable = true; + externalIP = "10.141.1.5"; + externalInterface = "wlp4s0"; + internalIPs = "10.141.4.0/24"; + internalInterfaces = [ "enp1s0" + ]; + }; + services.dhcpd = { enable = true; interfaces = "enp1s0"; @@ -181,7 +186,8 @@ option subnet-mask 255.255.255.0; option broadcast-address 10.141.1.1; option domain-name-servers 10.141.1.1, 8.8.8.8, 8.8.4.4; - option domain-name "asgard.yggdrasil"; + option domain-name "bragisheimr.yggdrasil"; + option routers 10.141.4.1; subnet 10.141.4.0 netmask 255.255.255.0 { range 10.141.4.100 10.141.4.254; } -- cgit v1.2.3