[DRAFT - hmm, it seems like several steps, references and troubleshooting have all been deleted. History doesn't go back long enough to show when this happened. The steps stop with wifi being turned off - perhaps, this should read turn off MacBook's wi-fi???. https://pimylifeup.com/raspberry-pi-wifi-bridge/. I need to check if this guide works as it is]
A Wi-Fi bridge allows a device that only has an ethernet port to access the net using Wi-Fi.
For this project, I'll use a Raspberry Pi 3B+ running raspbian stretch
Parts:
Raspberry Pi 3 B+, Amazon/Element14, $37.78
microSD Card (5 pack only need one), Amazon, $22.75
Miuzei Case, Power Supply, Fan and Heat Sinks, Amazon, $16.59
Ethernet cable, Amazon, $5.48
Step 1. Setup Raspberry Pi 3 B+ with Raspbian
In Step 1 instructions use the optional step, to set up the Raspberry Pi as Headless.
When complete, you should have a username, password, and hostname with a Raspberry Pi connected to your Wi-Fi network
Step 2. Update and Upgrade
Open a terminal window on the MacBook
Run the commands:
$ ssh pi@hostname.local
$ sudo apt-get update
$ sudo apt-get upgrade -y
Step 3. Add Simple Fan
To check the temperature, run the command
$ vcgencmd measure_temp
In general, the fan should not run. If it is running all the time, then something is wrong.
Step 4. Install dnsmasq
In most setups, the Raspberry Pi only has the Wi-Fi or the ethernet interface active. For a bridge, we need to connect a device using an ethernet connection, and then traffic must flow over the Wi-Fi interface to get to the home LAN and out to the internet.
By having traffic flow from a device with only an ethernet connection, through the Raspberry Pi, and out over Wi-Fi to the internet the Raspberry Pi will have to act as a minimal router.
The first step is to get dnsmasq installed using the command:
$ sudo apt-get install dnsmasq -y
Step 5. Set up Raspberry Pi ethernet port
$ sudo nano /etc/dhcpcd.conf
# wi-fi bridge
interface eth0
static ip_address=192.168.220.1/24
static routers=192.168.220.0
Step 6. Set up DNS and DHCP
Create a backup of the dnsmasq.conf file
$ sudo cp /etc/dnsmasq.conf /etc/dnsmasq.backup
Edit the conf to contain the following lines:
$ sudo nano /etc/dnsmasq.conf
interface=eth0 # Use interface eth0
listen-address=192.168.220.1 # Specify the address to listen on
server=8.8.8.8 # Use Google DNS
domain-needed # Don't forward short names
bogus-priv # Drop the non-routed address spaces.
dhcp-range=192.168.220.50,192.168.220.150,12h # IP range and lease time
Step 7. Enable IPv4 forwarding
Enable IPv4 forwarding
$ sudo nano /etc/sysctl.conf
Uncomment this line
net.ipv4.ip_forward=1
Step 8. Restart services and Raspberry Pi
$ sudo service dhcpcd restart
$ sudo service dnsmasq start
$ sudo reboot
Step 9. connect MacBook to raspberry pi
Turn off Wi-Fi and plug MacBook into Raspberry Pi using an ethernet cable.