!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

915 Members
Declaratively manage your switching, routing, wireless, tunneling and more.268 Servers

Load older messages


SenderMessageTime
4 Jun 2021
@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
@elvishjerricco:matrix.orgElvishJerriccoIt worked! The iPhone has internet, and the pi can be accessed on the network00:27:48
@hexa:lossy.networkhexa🎉00:28:06
@elvishjerricco:matrix.orgElvishJerriccoAlright, now in theory all i need is more reliable hardware than a pi and I can get a pretty good network going with a couple access points hooked up to a dhcp server.00:28:50
@elvishjerricco:matrix.orgElvishJerriccoAnything good out there that A) I can install NixOS on, B) has reasonable performance, and C) isn't as expensive as a full blown PC?00:29:57
@hexa:lossy.networkhexamost access points won't handle nixos too well 😂00:30:43
@hexa:lossy.networkhexawhich is why https://github.com/telent/nixwrt was created 00:30:59
@hexa:lossy.networkhexa but I don't know if anyone besides telent is using that 00:31:20

Show newer messages


Back to Room ListRoom Version: 6