Raspberry Pi Zero secure VPN client - part 2 sharing Internet via UFW

Опубликовано: 29 Март 2026
на канале: Shiunbird
463
4

Whenever we connect to a public network, before we get the chance to connect to VPN, lots of applications start broadcasting data or trying to log into different services. If the application is not well maintained or the network insecure, you run into the risk of exposing your personal data to other devices on that network or to its maintainer.

My plan is to disable Wi-Fi on my laptop completely and first log into my Raspberry Pi, connect to the public network using my Raspberry, establish a VPN connection to my home and only then start forwarding traffic from the Pi to my laptop.

The Raspberry Pi Zero is perfect for that. It can run as a USB Ethernet interface through which you can log into the Raspberry via VNC.

In this video, I'm going to setup internet connection sharing from my VPN tunnel to the USB Ethernet device.

Episode index:
00:00 - Introduction
00:52 - Interface settings
01:50 - UFW installation and basic settings
05:00 - Checking UFW status
05:38 - Tightening the firewall settings
10:32 - Setting up internet connection sharing with UFW (IP masquerading)
15:30 - Testing
16:30 - Simulation