Page 1 of 1

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

Posted: Sun Aug 18, 2019 4:08 pm
by lucap
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

Re: Raspberry Pi 4 and access point

Posted: Sun Aug 18, 2019 10:20 pm
by epoch1970
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.

Re: Raspberry Pi 4 and access point

Posted: Mon Aug 19, 2019 10:59 am
by lucap
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)?

Re: Raspberry Pi 4 and access point

Posted: Mon Aug 19, 2019 11:09 am
by Ernst
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

Re: Raspberry Pi 4 and access point

Posted: Mon Aug 19, 2019 1:09 pm
by lucap
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.

Re: Raspberry Pi 4 and access point

Posted: Mon Aug 19, 2019 1:16 pm
by epoch1970
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...

Re: Raspberry Pi 4 and access point

Posted: Mon Aug 19, 2019 6:41 pm
by lucap
[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