diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-16 20:41:12 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-16 20:41:12 +0200 |
commit | bf7ba926d9f2eb02dd720cf08e51a2e71545172b (patch) | |
tree | ddfac84c3653f707e80d12ea062431222f2ddc2f | |
parent | f51b67ff145c2a86132a4a4952ab2f810510d8b2 (diff) | |
download | nixos-bf7ba926d9f2eb02dd720cf08e51a2e71545172b.tar nixos-bf7ba926d9f2eb02dd720cf08e51a2e71545172b.tar.gz nixos-bf7ba926d9f2eb02dd720cf08e51a2e71545172b.tar.bz2 nixos-bf7ba926d9f2eb02dd720cf08e51a2e71545172b.tar.xz nixos-bf7ba926d9f2eb02dd720cf08e51a2e71545172b.zip |
Proxy-ARP → NAT
-rw-r--r-- | bragi.nix | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -163,17 +163,22 @@ | |||
163 | ''; | 163 | ''; |
164 | 164 | ||
165 | networking.interfaces = { | 165 | networking.interfaces = { |
166 | "wlp4s0" = { | ||
167 | proxyARP = true; | ||
168 | }; | ||
169 | "enp1s0" = { | 166 | "enp1s0" = { |
170 | proxyARP = true; | ||
171 | useDHCP = false; | 167 | useDHCP = false; |
172 | ipAddress = "10.141.4.1"; | 168 | ipAddress = "10.141.4.1"; |
173 | prefixLength = 24; | 169 | prefixLength = 24; |
174 | }; | 170 | }; |
175 | }; | 171 | }; |
176 | 172 | ||
173 | networking.nat = { | ||
174 | enable = true; | ||
175 | externalIP = "10.141.1.5"; | ||
176 | externalInterface = "wlp4s0"; | ||
177 | internalIPs = "10.141.4.0/24"; | ||
178 | internalInterfaces = [ "enp1s0" | ||
179 | ]; | ||
180 | }; | ||
181 | |||
177 | services.dhcpd = { | 182 | services.dhcpd = { |
178 | enable = true; | 183 | enable = true; |
179 | interfaces = "enp1s0"; | 184 | interfaces = "enp1s0"; |
@@ -181,7 +186,8 @@ | |||
181 | option subnet-mask 255.255.255.0; | 186 | option subnet-mask 255.255.255.0; |
182 | option broadcast-address 10.141.1.1; | 187 | option broadcast-address 10.141.1.1; |
183 | option domain-name-servers 10.141.1.1, 8.8.8.8, 8.8.4.4; | 188 | option domain-name-servers 10.141.1.1, 8.8.8.8, 8.8.4.4; |
184 | option domain-name "asgard.yggdrasil"; | 189 | option domain-name "bragisheimr.yggdrasil"; |
190 | option routers 10.141.4.1; | ||
185 | subnet 10.141.4.0 netmask 255.255.255.0 { | 191 | subnet 10.141.4.0 netmask 255.255.255.0 { |
186 | range 10.141.4.100 10.141.4.254; | 192 | range 10.141.4.100 10.141.4.254; |
187 | } | 193 | } |