lucap
Posts: 7
Joined: Mon Feb 23, 2015 2:00 pm

[SOLVED] Raspberry Pi 4: access point and VPN router

Sun Aug 18, 2019 4:08 pm

I installed on my brand new Raspberry Pi 4 the latest Raspbian distribution:

Code: Select all

Raspbian Buster with desktop
Image with desktop based on Debian Buster
Version:July 2019
Release date:2019-07-10
I followed a couple of tutorial to create an access point using wlan0, the first one was the official one:

https://www.raspberrypi.org/documentati ... s-point.md

I had no success, though, because the ssid was not appearing on other devices. Then i decided to use this other tutorial (which is very similar) on a new installation:

https://thepi.io/how-to-use-your-raspbe ... ess-point/

when i finished i was able to see and use the raspberry as an access point, problem is that I was not able to use the browser anymore because of (i guess) DNS problem that i was not able to fix. In the end I decide to play around with the configuration and I finally got it working removing the br0 bridge.

Code: Select all

sudo ip link set br0 down
sudo brctl delbr br0
this works until next reboot, in fact, the interfaces comes back thanks to what is written in /etc/network/interfaces.

This is not an orthodox approach but whenever i give that two commands chrome starts to work ok and the connection to the access point are good, Can someone point in the right direction to understand what is wrong with my configuration?

EDIT:
I just noticed that in the official guide it is said that denyinterfaces line should always be before the first interface specification, something that is not true in the tutorial I followed, now I put the denyinterfaces alone in the file and everything works fine but I think that I just got a bridged connection without DHCP, in fact, connecting to the raspberry it looks like that you are directly connected to the home router, should wlan0 have an IP or not when bridged? I'm confused now
Last edited by lucap on Tue Aug 20, 2019 12:21 pm, edited 2 times in total.

epoch1970
Posts: 3655
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Raspberry Pi 4 and access point

Sun Aug 18, 2019 10:20 pm

The official How-to AP documentation currently has some issues.

The other document you link is a bad copy paste job of the original. The mor*n who posted that page mixes routed and bridged setups like there’s no tomorrow.

Bridge member interfaces (eg wlan0) never have an IP address.
Bridge interfaces (e.g. br0) usually have an IP address.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

lucap
Posts: 7
Joined: Mon Feb 23, 2015 2:00 pm

Re: Raspberry Pi 4 and access point

Mon Aug 19, 2019 10:59 am

epoch1970 wrote:
Sun Aug 18, 2019 10:20 pm
The official How-to AP documentation currently has some issues.

The other document you link is a bad copy paste job of the original. The mor*n who posted that page mixes routed and bridged setups like there’s no tomorrow.

Bridge member interfaces (eg wlan0) never have an IP address.
Bridge interfaces (e.g. br0) usually have an IP address.
good to hear that, I was getting crazy to try to make it run. Can you point me to some good guide (even not raspberry related) to create an access point (even without DHCP)?

Ernst
Posts: 1231
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Raspberry Pi 4 and access point

Mon Aug 19, 2019 11:09 am

lucap wrote:
Mon Aug 19, 2019 10:59 am
epoch1970 wrote:
Sun Aug 18, 2019 10:20 pm
The official How-to AP documentation currently has some issues.

The other document you link is a bad copy paste job of the original. The mor*n who posted that page mixes routed and bridged setups like there’s no tomorrow.

Bridge member interfaces (eg wlan0) never have an IP address.
Bridge interfaces (e.g. br0) usually have an IP address.
good to hear that, I was getting crazy to try to make it run. Can you point me to some good guide (even not raspberry related) to create an access point (even without DHCP)?
I suggest you read this thread: https://www.raspberrypi.org/forums/view ... &p=1510898
The road to insanity is paved with static ip addresses

lucap
Posts: 7
Joined: Mon Feb 23, 2015 2:00 pm

Re: Raspberry Pi 4 and access point

Mon Aug 19, 2019 1:09 pm

First thing that comes to my eyes is:
Do not mix the first and second part of this guide, the configurations are not compatible.
I'm happy to see that I'm not the only one that mixed the two things together at the begging, into the guide it is never explicated that the second part is not compatible with the first, In this case two guides would be better than one.

epoch1970
Posts: 3655
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Raspberry Pi 4 and access point

Mon Aug 19, 2019 1:16 pm

Yeah. I guess someone should bite the bullet, clone the doc, revise it and make a PR. The few last commits weren’t all spotless.
Somehow I manage not to find the time or to be away from my Pis when I could...
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

lucap
Posts: 7
Joined: Mon Feb 23, 2015 2:00 pm

Re: Raspberry Pi 4 and access point

Mon Aug 19, 2019 6:41 pm

[SOLUTION]
If anybody will come across my question here is how i enable the access point and rerouted the traffic through a VPN:

Combining the following two tutorials:
https://pimylifeup.com/raspberry-pi-wir ... ess-point/
https://pimylifeup.com/raspberry-pi-vpn-access-point/

on a freshly installed system:

Code: Select all

Linux version 4.19.66-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1253 SMP Thu Aug 15 12:02:08 BST 2019

Code: Select all

   Static hostname: raspberrypi
         Icon name: computer
        Machine ID: fad04d81fb654fddadb2811b382c0ef1
           Boot ID: 51fd9bf42f534cedb976e4017734f5a7
  Operating System: Raspbian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.66-v7l+
      Architecture: arm
I finally got my raspberry to work as VPN router

Return to “Troubleshooting”