How to Turn Your Raspberry Pi into a Secure Travel Router
Traveling can be a lot of fun, but staying connected to the internet securely while on the road is crucial. Whether you’re staying at hotels, Airbnbs, or connecting at places like Starbucks, public Wi-Fi networks can pose significant security risks. During a recent 10-day road trip, I realized the necessity of having a secure internet connection while traveling. To protect my family’s online activities, I decided to turn my Raspberry Pi 3B+ into a secure travel router. This guide will help you do the same.
Required Components
- Raspberry Pi (I used a Raspberry Pi 3B+)
- Micro SD card (32GB recommended)
- USB Wi-Fi dongle compatible with Raspberry Pi (I used an EASTECH Wi-Fi dongle)
- Ethernet cable (optional but recommended for setup)
Raspberry Pi OS Installation
1. Download and Install Raspberry Pi Imager: Ensure you’re using version 1.8.5 or later.
2. Prepare the Micro SD Card:
- Insert the SD card into your card reader.
- Open Raspberry Pi Imager and select the OS:
Raspberry Pi OS Lite (64-bit)
. - Select the correct storage device.
3. Configure Settings:
- Set the hostname to
raspap
. This can be aything you wan it to be. - Set your default username and password.
- Configure your home network settings.
- Choose your wireless LAN country settings and time zones.
- Enable SSH and use password authentication.
4. Write the OS: Click Write
and wait for the process to complete.
Updating Raspberry Pi OS
1. Boot Your Raspberry Pi:
- Insert the micro SD card into your Raspberry Pi.
- Connect an ethernet cable if you have one (optional but speeds up the process).
2. Access the Terminal:
- On a Mac, use
raspap.local
. On Windows, you might need to find the IP address or install Bonjour.
3. Update Your Raspberry Pi:
- Run the command
sudo apt update && sudo apt upgrade -y
.
Installation of RaspAP
- Install RaspAP:
- Visit the RaspAP documentation.
- Copy the installation command and paste it into the terminal. (
curl -sL https://install.raspap.com | bash
) - Follow the prompts, saying
yes
to recommended services andno
to optional services like ad-blocking, openVPN support, wireguard support and VPN provider support. This is totally optional. If you want to, you can configure these options.
After the installation is complete, reboot your pi.
After your pi is back up
Configuring RaspAP
1. RaspAP Control Panel:
- Open your browser and go to
raspap.local
or use the IP address10.3.141.1
. - Log in with the default credentials (
admin
andsecret
).
2. Set Up Wireless Interfaces:
- Go to the Hotspot settings and change the Wi-Fi adapter for the hotspot to
wlan1
.
- Change the security settings (update default password to be used to connect to your newly created Wi-Fi) and set the country code.
- Save the settings but do not reboot yet.
Remove Old Configurations:
- Delete any hotspot configuration for
wlan0
:sudo nano /etc/dhcpcd.conf
- Remove all the lines related to
wlan0
- Remove preconfigured network settings:
sudo rm /etc/NetworkManager/system-connections/preconfigured-nm-connection
sudo rm /etc/wpa_supplicant/wpa_supplicant.conf
- Reboot your pi:
sudo reboot
Final Testing
1. Connect to the New Hotspot:
- After rebooting, connect to the Raspberry Pi’s new hotspot network.
2. Configure Wi-Fi Client:
- Go to
raspap.local
and log in.
- In the Wi-Fi client section, connect to your home network or any other available network.
This is what you would do when you are in a public place on a public network. Goto raspap control panel, navigate to Wi-Fi client, connect to the public Wi-Fi you would want to from that panel.
This enables you to connect to a Wi-Fi network through your VPN running on your raspberry pi.
Conclusion
Your Raspberry Pi is now a functional and secure travel router. With this setup, you can safely connect to public Wi-Fi networks, ensuring a stable and secure internet connection for you and your family. This setup is especially useful while traveling, providing peace of mind regarding online security.