0

Are there any opensource scripts/repos that automate configuring a Raspberry Pi into a Wireless Access Point?

0

Yes: "pi-ap" a GPL 3.0 repo in Github. I configured a series of bash scripts which automate the configuration of:

  • hostapd
  • dnsmasq
  • wpa_supplicant
  • dhcpcd

...to turn a a Raspberry Pi into a Wireless Access Point. Tested on Pi 3B+ and Pi 4 with both Raspbian Stretch and Buster.

Additional Features:

  • Fast DNS: systemd-resolved configured as a caching stub-resolver
  • Enhanced Security: MAC Address whitelisting adds another layer of defenses
  • No Subnet Calculator Required: Any required IP calculations are done for you
  • Firewalling: A basic UFW config provided which also masquerades the eth0 interface in the NAT chain
  • No Network Guru Skills Required: Fill in some values in variables.sh and execute sudo ./install.sh and you can have a working AP quite quickly
  • Scripts are modular and all very well documented.
  • POE Compatible: Stick a POE Hat on it and you can emplace the AP where a 1.5 meter mains power lead won't reach

Required Infrastructure:

You just need a DHCP-enabled Ethernet port in a router or switch to connect the Pi's eth0 port for an uplink.

My neighbour confirmed the solution worked with his BT "Home Hub" (which I understand is very common in the UK; I use a MikroTik router myself). He just connected the Pi via its' eth0 port, connected to the AP's SSID on his phone and started browsing successfully.

Use Cases:

"pi-ap" (it seemed an obvious thing to call it ;-> ) is not meant to be a replacement for an Enterprise wireless networking gear, but it suggests several obvious use cases:

  • Extend WiFi coverage to dead-zones. Internet won't reach either parts of your home/office or possibly your hammock in your backyard?!?!?
  • Could take it with you to a data center if working behind a rack...
  • Network Training: This is a great training aid for teaching networking.

I guess there is a lot more that could be done, but this is a pretty good beginning. The repo can be be found at:

https://github.com/f1linux/pi-ap

Instructions/Video Tutorials:

If you have an bugs to report or features to report, please do so through the Github modalities. Hope folks find this useful- Terrence

  • What's the uplink? Wired (eth0) or wireless (wlan0, ap0)? – Ingo Aug 21 at 7:29
  • eth0. If the Pi is plugged into a DHCP-enabled port on your router, since it's a directly connected route, you don't need to do anything with the routing. Give it a bash. Any bugs or features, happy to collaborate. – F1Linux Aug 21 at 7:35
  • You should mention it. I have seen some newbees are looking for a pure WiFi repeater and confused it with a wired uplink. – Ingo Aug 21 at 7:42
  • 1
    @Ingo Just incorporated your feedback. Although I guess it's an obvious thing to us, might not be so obvious thing to folks with limited networking knowledge. Just reviewed my README.md file in the repo and looks like I don't expressly describe the uplink as eth0 there, so will update it there too. Thanks for your feedback- most appreciated! -T – F1Linux Aug 21 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.