How To Turn A Raspberry Pi Into A VPN-Secured Travel Router


Public Wi-Fi networks are a blessing in disguise, especially when you are traveling. They bring you convenience, but with convenience comes greater cyber security risks.

However, if you are left with no other option and want to stay connected while on the move, you must use a VPN in any case. A VPN is designed to maintain your privacy and keep you safe while you are connected to the internet. But each device needs a separate client app unless you have a travel router.

If you need an expert opinion about VPNs, you can count on the recommended best router VPN by VPNRanks.

Carrying a separate modem or router while you are traveling isn’t feasible. But you needn’t worry as you can turn your Raspberry Pi into a VPN-secured travel router. Don’t know how to do that? Let’s find out!

Pre-requisites

You’ll need the following things to start developing your Raspberry Pi into a VPN mobile router:

  • Raspberry Pi with casing (Raspberry Pi Zero W or Pi 3)
  • Two USB WiFi adapters, if you have an outdated Raspberry Pi (one for the latest)
  • A micro SD drive with a minimum of 8GB of space
  • A reader for SD card
  • A reliable power source
  • SSH client on PC
  • A VPN service that supports OpenVPN

Step No. 1: Install OpenWRT

Install the OpenWRT software for your specific Raspberry Pi model. The OpenWRT program has the most recent pictures available.

Use 7zip or any other compatible file archive software to unzip your download files, then use Etcher to flash the image file to your memory card.

The SD card (external card) is immediately detected by this tool; all you have to do is choose your picture file, choose the proper drive, and then hit “Flash.”

After that, reinstall your SD card in the Raspberry Pi and reboot it.

Step No. 2: Preliminary Configuration

The default IP address for OpenWRT is 192.168.1.1, which is also the IP address for several routers’ default gateways. To avoid disagreements, this must be changed. Use an Ethernet wire to link your Raspberry Pi to your Computer; you might have to configure your PC’s default IP.

To ensure the setup is installed properly, you will manage it yourself instead of utilizing LuCI, OpenWRT’s online interface. Start PuTTY or your SSH client and enter the administrator username to log in to 192.168.1.1 first.

Step No. 3: Upgrade and Install Packages

The next step is to upgrade the OpenWRT. To accomplish so, you’ll use the Pi’s built-in WiFi and initially configure it to join your current WiFi network. To connect, users might need to update their static IP to 192.168.38.2 or another address within that range.

To enter the OpenWRT admin panel after connecting, enter the IP address of the Raspberry Pi in your web browser. After logging in with your login details, select Network > Wireless. At this time you will only find one Wi-Fi device at this time, so click the Scan button to discover your network and then Join Network after that.

Before clicking “Submit,” you must type your Wi-Fi password into the labeled WPA Passphrase.

Your WiFi connection settings should now be available. For example, if you don’t set your postcode to reflect your location under Advanced Settings, your Wi-Fi can not function.

SSH-reconnect to your Raspberry Pi using the new IP address (accepting the RSA security key censure). Your device has to be updated first.

Configuring the USB Wi-Fi Drivers

Install any necessary drivers for the USB Wi-Fi device after you’ve finished installing all patches. According to the traveling guide, this tool is necessary this will help you when you are planning to travel abroad. Additionally, you should install nano, a more user-friendly terminal files editor, along with the software you’ll need for the OpenVPN connection.

After the files have been installed, a list of linked devices will appear. First, look for a wireless module, then find the proper installation guidelines for your device.

Step No. 4: Configure Wi-Fi Access Point

You may now manage both your Wi-Fi networks if the USB Wi-Fi device is attached. Disconnect both wifi networks from Wireless on the LuCI panel. Radio0 represents your built-in WiFi, whilst your USB Wi-Fi device is defined by radio1.

To configure your built-in Wi-Fi, select “Add”. Make sure that:

  • Access Point is the chosen mode
  • Your preferred network identity is used as the ESSID; OpenWRT is the default
  • The network is configured as LAN
  • The encryption setting for protection is WPA2-PSK
  • The lead is a good password

Hit Save when finished, then go back to the Wireless option. Connect the radio1 tool (your USB Wi-Fi adapter) to your current network using the previous connection guidelines. If you’re in a different location, this is where you’ll have to check for networks and switch them.

Now that both Wi-Fi connections are active, one needs to serve as an entry point to all Wi-Fi devices and the other as an internet connection for all devices to your current Wi-Fi network. Test the connectivity to your Pi on your computer or smartphone to ensure it works.

Step No. 5: Connect to the VPN and Make Final Modifications

To connect your Raspberry Pi to your preferred VPN service, OpenVPN (OVPN) configuration file is required. If you do have the OVPN, download it to your Pi via an SCP program – WinSCP – and connect it with your login details.

To manage your Pi for VPN connections, follow the directions on the OpenWRT page.

Once you’ve finished, your VPN connection ought to start up immediately. Check to see whether your IP address has changed; if not, restart your Pi and verify that your connection is functional.

To find this, go to the OpenVPN segment of LuCl, which is displayed within Service on the homepage at the top. VPN client will be indicated as affirmative in the Started section if it is established.

Step No. 6: Connect Your Device to a Public Wi-Fi Network

Now, your Pi is almost ready, but if you’ve used public Wi-Fi, you remember that you usually have to log in via a specific URL to make a purchase or enroll your device. These domains will often be banned as your Pi has been redesigned to connect instantly through VPN (and prohibit connectivity otherwise).

Restart to ensure everything is operating properly. You should also look for DNS leaks to confirm that your VPN connection is functioning properly. Most VPN companies give a feature to aid with this.

 


Kossi Adzo

Kossi Adzo is a technology enthusiast and digital strategist with a fervent passion for Apple products and the innovative technologies that orbit them. With a background in computer science and a decade of experience in app development and digital marketing, Kossi brings a wealth of knowledge and a unique perspective to the Apple Gazette team.

0 Comments

Your email address will not be published. Required fields are marked *