diff options
Diffstat (limited to 'config/ap.nix')
-rw-r--r-- | config/ap.nix | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/config/ap.nix b/config/ap.nix index af98095..18c0c6e 100644 --- a/config/ap.nix +++ b/config/ap.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - wan-dev = "enp0s25"; - lan-dev = "wlp4s0"; + wan-dev = "enp37s0"; + lan-dev = "wlp39s0"; in { networking.networkmanager.enable = lib.mkForce false; @@ -38,8 +38,17 @@ in interface lo ACCEPT; proto icmp icmp-type echo-request ACCEPT; + interface $DEV_WAN { + # RTMP + # proto (tcp udp) dport 1935 ACCEPT; + + # Factorio + proto udp dport 34197 ACCEPT; + } + interface $DEV_LAN @subchain "services" { - proto (tcp udp) dport (ssh domain bootps) ACCEPT; + # 1935 for rtmp testing + proto (tcp udp) dport (ssh domain bootps 1935 4317 5353) ACCEPT; # Chromecast # proto udp dport 32768:61000 ACCEPT; @@ -96,7 +105,6 @@ in services.hostapd = { enable = true; - # driver = "iwlwifi"; ssid = "2c"; wpaPassphrase = "mintchip"; interface = "${lan-dev}"; @@ -109,17 +117,20 @@ in ''; }; + networking.useDHCP = true; networking.dhcpcd = { + enable = true; + denyInterfaces = [ lan-dev ]; extraConfig = '' # debug noipv6rs - denyinterfaces ${lan-dev} interface ${wan-dev} dhcp ipv6rs ia_na 1 ia_pd 1/::/56 ${lan-dev}/0/64 ''; + wait = "background"; }; services.dnsmasq = { @@ -132,7 +143,7 @@ in dhcp-option=option:dns-server,10.64.30.1 dhcp-option=option:netmask,255.255.255.0 - dhcp-range=::,constructor:${lan-dev},slaac + #dhcp-range=::,constructor:${lan-dev},slaac ''; }; @@ -145,7 +156,6 @@ in networking.interfaces.${wan-dev} = { macAddress = "3c:97:0e:19:7e:5c"; - useDHCP = true; }; networking.interfaces."${lan-dev}" = { |