!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

906 Members
Declaratively manage your switching, routing, wireless, tunneling and more.265 Servers

Load older messages


SenderMessageTime
4 Jun 2021
@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
@elvishjerricco:matrix.orgElvishJerriccoOof, TIL Element does not shrink down those code blocks into a scrolling thingy23:40:16
@elvishjerricco:matrix.orgElvishJerriccoThe pi itself is able to access the internet23:40:53
5 Jun 2021
@hexa:lossy.networkhexaright, so since it's bridged you don't need to enable forwarding00:08:09
@hexa:lossy.networkhexawhat does "can't access the internet" exactly mean?00:08:34
@hexa:lossy.networkhexadoes DHCP work?00:08:40
@treed:cybre.spacetreedIt's a scrolling pane for me in Element00:14:11
@elvishjerricco:matrix.orgElvishJerricco hexa: No, dhcp does not appear to work 00:24:31
@hexa:lossy.networkhexatcpdump the wireless interface, see if dhcp requests arrive00:24:51
@hexa:lossy.networkhexathen tcpdump the bridge to make sure the requests arrive there as well00:25:05
@elvishjerricco:matrix.orgElvishJerriccoiOS joins the network but then the dhcp server never says there was any request00:25:14
@hexa:lossy.networkhexaahh stop00:25:18
@hexa:lossy.networkhexaset bridge=br0 in hostapd extraConfig00:25:32
@elvishjerricco:matrix.orgElvishJerriccoAh, right00:25:46

Show newer messages


Back to Room ListRoom Version: 6