!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

893 Members
Declaratively manage your switching, routing, wireless, tunneling and more.261 Servers

Load older messages


SenderMessageTime
4 Jun 2021
@qyliss:fairydust.spaceAlyssa Rosswell, my suggestion is to drop "on your Router!", as I said14:55:24
@telent:matrix.orgtelentmaybe Nix on Routers would make more sense as a separate channel ... though I guess not unless anyone running nix on their routers wants to talk about it15:10:15
@hexa:lossy.networkhexa changed the room topic to "Declaratively manage your switching, routing, wireless, tunneling and more." from "on your Router! Declaratively manage your switching, routing, wireless, tunneling and more.".15:11:46
@hexa:lossy.networkhexa this room seems low traffic enough to talk about nixwrt as well, unless you want a separate channel for that (compare #nixos-on-arm:nixos.org and mobile-nixos) 15:12:33
@qyliss:fairydust.spaceAlyssa RossI think this is a good place to talk about routers15:12:43
@elvishjerricco:matrix.orgElvishJerricco joined the room.19:37:24
@antifuchs:asf.computerantifuchshah, I've been wanting to set up a nice dedicated router for my home network with nix... it seems like a very good match19:39:41
@elvishjerricco:matrix.orgElvishJerricco So I'm playing around with using a raspberry pi as an access point using the hostapd options in nixos, but I'm getting AP-STA-POSSIBLE-PSK-MISMATCH when I enter the correct password on my iPhone. Anyone have any idea why that might be happening? 20:38:41
@telent:matrix.orgtelent
In reply to @hexa:lossy.network
this room seems low traffic enough to talk about nixwrt as well, unless you want a separate channel for that (compare #nixos-on-arm:nixos.org and mobile-nixos)
ngl, I joined this channel in case there were any conversations about nixwrt - but by odd coincidence, all my discretionary hacking time right now is on mobile-nixos anyway
20:48:57
@hexa:lossy.networkhexa ElvishJerricco: in openwrt there is an option auth_cache that iOS needs IIRC 21:53:23
@hexa:lossy.networkhexa that maps to disable_pmksa_caching = 0 21:54:32
@hexa:lossy.networkhexaalso this https://support.apple.com/en-us/HT202628 for what iOS supports with regards to wlan21:55:19
@hexa:lossy.networkhexaand lastly https://github.com/raspberrypi/linux/issues/245321:56:44
@hexa:lossy.networkhexathat maps well to the raspberry pi 4, and in there somewhere a cypress engineer says that AP mode is not a priority21:57:16
@hexa:lossy.networkhexaand from my experience it doesn't work too well21:57:23
@hexa:lossy.networkhexaafter some time clients will get disconnected and be unable to reconnect21:57:34
@elvishjerricco:matrix.orgElvishJerricco hexa: Thanks, I've got it working now. FYI I don't intend to use this in any capacity; I'm just learning how to build router like things with nixos. 23:02:37
@hexa:lossy.networkhexaawesome, don't let me stop you23:02:58
@hexa:lossy.networkhexamy recommendation is to go with systemd-networkd fwiw23:03:06
@hexa:lossy.networkhexaleave the scripted networking behind, it has no future23:03:15
@elvishjerricco:matrix.orgElvishJerricco hexa: I absolutely would if I had any idea how to use it for this :P 23:03:30
@hexa:lossy.networkhexathere's alot to learn from nixos/tests/systemd-networkd*23:04:03
@elvishjerricco:matrix.orgElvishJerriccoIs it possible for the pi to just bridge wlan0 with eth0 and still get its own IP on eth0? i.e. allow others to connect to an upstream NAT via the pi as an access point, but still let people on the network communicate with the pi?23:05:47
@mutantmell:helveticastandard.commutantmellI want to say it is, but I'm not 100% sure - I have a similar setup on one of my machines that runs as a VM host that bridges eth0, and it's still network accessible.23:08:30
@mutantmell:helveticastandard.commutantmellThat said, I'm new enough to this that I don't know for sure :)23:08:55
@hexa:lossy.networkhexait is, use the bridge option in hostapd.conf23:13:04
@hexa:lossy.networkhexaand configure ip addresses on the bridge23:13:18
@elvishjerricco:matrix.orgElvishJerriccoAs in put useDHCP on the bridge interface, not the eth0 interface?23:21:13
@hexa:lossy.networkhexapossibly23:23:28
@elvishjerricco:matrix.orgElvishJerricco

So I've got this:

  networking.useDHCP = false;
  networking.interfaces.eth0.useDHCP = false;
  networking.interfaces.wlan0.useDHCP = false;
  networking.interfaces.br0.useDHCP = true;
  networking.bridges.br0.interfaces = ["eth0" "wlan0"];

  networking.useNetworkd = true;

  services.hostapd = {
    enable = true;
    interface = "wlan0";
    hwMode = "g";
    ssid = "My Pi Network";
    wpaPassphrase = "foobarbaz";
    extraConfig = ''
      disable_pmksa_caching=0
      wpa_pairwise=CCMP
      rsn_pairwise=CCMP
    '';
  };

And iOS seems to be able to authenticate, but can't access the internet.

23:39:17

Show newer messages


Back to Room ListRoom Version: 6