Page 1 of 1

/configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 5:07 pm
by rednag
using noobs downloaded 09-02-17, instructions at raspberrypi.org/documentation/configuration/access-point.md do not work to configure a stand-alone network.

Re: /configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 7:26 pm
by SurferTim
I have my RPi3 working as an AP. DO NOT MODIFY /etc/network/interfaces FILE! The only uncommented line in that file should be
source-directory /etc/network/interfaces.d

First, insure your OS is up to date.

Code: Select all

sudo apt-get update
sudo apt-get upgrade
Then install the modules.

Code: Select all

sudo apt-get install dnsmasq hostapd
Replace wlx12345 with the name of your wifi interface and enx12345 with the ethernet interface from ifconfig in the following files. In the latest version of Stretch, these will be wlan0 and eth0.

My /etc/dhcpcd.conf addition:

Code: Select all

interface wlx12345
static ip_address=192.168.4.1/24
My /etc/dnsmasq.conf file

Code: Select all

interface=wlx12345
dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h
My /etc/hostapd/hostapd.conf file

Code: Select all

interface=wlx12345
driver=nl80211
ssid=RPiNet
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mypassphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Edit /etc/default/hostapd, uncomment and change this:

Code: Select all

DAEMON_CONF="/etc/hostapd/hostapd.conf"
Edit /etc/sysctl.conf and uncomment

Code: Select all

net.ipv4.ip_forward=1
The next section is required only if you are wanting to access the internet through the ethernet connection. If you want a standalone network, stop here and reboot.

My iptables rules.

Code: Select all

sudo iptables -t nat -A  POSTROUTING -o enx12345 -j MASQUERADE
Then make the iptables rule permanent.

Code: Select all

sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
Then in /etc/rc.local, add this:

Code: Select all

iptables-restore < /etc/iptables.ipv4.nat
reboot

Re: /configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 7:46 pm
by jamesh
I need to update those instructions for use with Stretch, where tings work differently, just not had the time.

Happy to accept community generated pull requests....

Re: /configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 9:12 pm
by SurferTim
@jamesh: I have brief instructions for most of what is on the doc. Where would you like them?

Re: /configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 9:20 pm
by asavah
SurferTim wrote:
Sun Sep 24, 2017 9:12 pm
@jamesh: I have brief instructions for most of what is on the doc. Where would you like them?
Probably there https://github.com/raspberrypi/documentation as a pull request https://help.github.com/articles/about-pull-requests/

Re: /configuration/wireless/access-point.md no longer works

Posted: Sun Sep 24, 2017 9:44 pm
by SurferTim
@asavha: It's there as a pull request.
https://github.com/raspberrypi/document ... 2a96060f63

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 8:12 am
by jamesh
Thanks, I'll take a look today.

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 11:01 am
by SurferTim
jamesh wrote:
Mon Sep 25, 2017 8:12 am
Thanks, I'll take a look today.
You might need to do a bit of format editing. I'm not that good with that online editor. If you find any errors, let me know and I'll try again.

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 12:21 pm
by jamesh
SurferTim wrote:
Mon Sep 25, 2017 11:01 am
jamesh wrote:
Mon Sep 25, 2017 8:12 am
Thanks, I'll take a look today.
You might need to do a bit of format editing. I'm not that good with that online editor. If you find any errors, let me know and I'll try again.
I'll just do a tech check (might not be today now), then we have copy editors who will do format and grammatical checking, then I re-check (to make sure copy edits haven't affecting the content), then it gets merged.

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 12:22 pm
by SurferTim
jamesh wrote:
SurferTim wrote:
Mon Sep 25, 2017 11:01 am
jamesh wrote:
Mon Sep 25, 2017 8:12 am
Thanks, I'll take a look today.
You might need to do a bit of format editing. I'm not that good with that online editor. If you find any errors, let me know and I'll try again.
I'll just do a tech check (might not be today now), then we have copy editors who will do format and grammatical checking, then I re-check (to make sure copy edits haven't affecting the content), then it gets merged.
I'm good with that. Let me know if you have tech check problems.

Edit: Anybody else who wants to tech check it, you can find it here:
https://github.com/SurferTim/documentat ... s-point.md

Edit2: I did find one error. Replace this:
ssh [email protected]
with this:
ssh [email protected]

Edit3: And another that causes the dhcpcd service fail and the double red x in the network icon. Change dhcp to manual.

Code: Select all

# Bridge setup
auto br0
iface br0 inet manual
bridge_ports eth0 wlan0

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 10:24 pm
by AndriusWild
Sorry I posted a comment in a wrong thread. ..

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 10:25 pm
by AndriusWild
AndriusWild wrote:
Mon Sep 25, 2017 10:24 pm
SurferTim wrote:
Mon Sep 25, 2017 12:22 pm
...
I have done all the recommended steps and my Pi working as a wireless AP now and assigning IPs to wi-fi clients but the bridge to eth0 isn't working anymore.
I tried to assign a static IP from 192.168.0.xxx subnet to eth0 in /etc/dhcpcd.conf but clients on wlan0 still can't reach the ones on eth0 and vice versa.... Everything looks pretty in ifconfig but there is no connection between eth0 and wlan0

Re: /configuration/wireless/access-point.md no longer works

Posted: Mon Sep 25, 2017 10:37 pm
by SurferTim
AndriusWild wrote: I have done all the recommended steps and my Pi working as a wireless AP now and assigning IPs to wi-fi clients but the bridge to eth0 isn't working anymore.
That is correct. You have a choice:
1) A bridge, which allow bidirectional client access.
2) An AP router, which allows only unidirectional access (wlan0 to eth0 only).

It sounds like you want a bridge with a dhcp server so the dhcp server works with or without the gateway router. You can assign a localnet IP to the bridge, and use dnsmasq to assign dhcp settings to both sides of the bridge, but you must disable the dhcp server on your gateway router to use this effectively. The localnet will not work without the RPi bridge operational. That is the tradeoff.

Re: /configuration/wireless/access-point.md no longer works

Posted: Thu Oct 05, 2017 12:42 pm
by SurferTim
Just an update. Nothing has been done. It still doesn't work with Jessie or Stretch. 'The doc is still out of date.
https://github.com/SurferTim/documentat ... 5f553f6b34

Re: /configuration/wireless/access-point.md no longer works

Posted: Thu Oct 05, 2017 12:46 pm
by jamesh
Sorry, been v. busy this week, so no chance to check the changes. I'm also off for Friday/Monday due to a music festival(!), so will hopefully get a chance to look at it next week.

Re: /configuration/wireless/access-point.md no longer works

Posted: Thu Mar 07, 2019 9:08 pm
by dougbert
Any work done on getting this recipe to work?

I am looking for the following configuration:

upstream access to the internet via wlan0 connection as a client,
and then eth0 connects to some downstream device, DHCP or static

A class I am teaching, has Wifi-Guest access so that is why it is the upstream connection to the internet, no hardwire
and I am teaching stuff on devices on a wired network that connects to my eth0 port

unidirectional eth0 to wlan0 only needed

since the inside will talk to the outside, but no need of the outside talking to the inside devices, I don't need the bridge,
but do need a configuration and iptables set up right (which I am weak in). I see the iptables mode for AP mode to eth0 internet sharing, but I assume I different setup would be required for my needs

thanks for the doc recipe so far

doug

Re: /configuration/wireless/access-point.md no longer works

Posted: Thu Mar 07, 2019 9:28 pm
by DirkS
dougbert wrote:
Thu Mar 07, 2019 9:08 pm
Any work done on getting this recipe to work?
Eh... afaik it *is* working
You're reviving 1.5 year old topic. The 'recipe' is constantly updated and refined; the latest change was made a month ago (https://github.com/raspberrypi/document ... s-point.md)

If you need a setup for a different configuration you should create a new topic.