How to setup a Raspberry Pi as an OpenVPN sharing gateway
Introduction
In this video, I’m showing you how to set up a Raspberry Pi as an OpenVPN sharing gateway.
Chapters
00:00 – Intro
00:19 – Parts needed
01:13 – Flashing Raspberry Pi OS to the SD card
03:17 – Booting the Raspberry Pi with Raspberry Pi OS
03:59 – Finding out the Raspberry Pi’s IP address with Advanced IP Scanner
05:20 – Connecting to the Raspberry Pi via SSH
06:38 – Updating the Raspberry Pi
07:38 – Setting a static IP address on the Raspberry Pi
10:50 – Installing and configuring OpenVPN on the Raspberry Pi
13:55 – Testing the OpenVPN connection on the Raspberry Pi
14:39 – Setting the OpenVPN connection to start on boot
15:54 – Setting IP Forwarding on the Raspberry Pi
16:37 – Installing and configuring iptables on the Raspberry Pi
19:18 – Setup a test machine for testing the gateway
21:28 – What is DNS leak and how to prevent it?
23:05 – Installing Bind9, a DNS server, on the Raspberry Pi
23:35 – Edit Bind9 config file
26:40 – Sharing the VPN gateway with all network clients
27:24 – Speed tests and conclusion
Hardware used
Links for the hardware used in this video or similar:
Raspberry Pi Kit: https://amzn.to/3tSZNm8
Sandisk SD cards: https://amzn.to/3hYzGET
USB Network Adapters: https://amzn.to/36hg2l6
References
DNS Leak: https://en.wikipedia.org/wiki/DNS_leak
DNS Leak Test: https://dnsleaktest.com/
NAT and iptables: https://www.howtoforge.com/nat_iptables
https://support.hpe.com/hpesc/public/docDisplay?docId=c03023605&docLocale=en_US
https://linux.die.net/man/8/iptables
IP forwarding: https://openvpn.net/faq/what-is-and-h…
https://forums.raspberrypi.com/viewto…
https://thepi.io/how-to-use-your-raspberry-pi-as-a-vpn-router/