User Tools

Site Tools


vpn-rpi4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
vpn-rpi4 [2020/04/30 08:59]
robm [ExpressVPN Access Point using a Raspberry Pi 4]
vpn-rpi4 [2020/04/30 09:16]
robm [Desired outcome]
Line 19: Line 19:
   * ... via home network when it is now   * ... via home network when it is now
  
 +===== Strategy =====
 +
 +Create a new WiFi network (''teleport'') which is **bridged** with the wired network, so traffic can flow between them. For this to work, the DHCP ranges of the two networks should be in the _same subnet_ (''192.168.167.0/24''), but not overlap. Wired uses '.100' to '.250', so the new WiFi will use '.40' to '.50'
 +
 +The Raspberry Pi itself gets its internet connection via the wired network - i.e. it uses the same router as other wired hosts (192.168.167.1).
 +
 +DHCP requests from the WiFi network will be answered by the Raspberry Pi (using ''dnsmasq''), and _not_ answered by my wired network. Since the networks are bridged my home network's router will attempt to answer DHCP requests - so we'll need to:
 +
 +  - Prevent DHCP requests from WiFi stations being answered by home network
 +  - Prevent DHCP requests from wired network being answered by Raspberry Pi
 +
 +The Raspberry Pi itself will not ask for IP addresses from the wired network. This keeps things simple, as the only IP on the Raspberry Pi will be on the bridge interface and it will be entirely predictable so we can embed it into the DHCP offers we give out (i.e. write it into ''/etc/dnsmasq.conf'')
 +
 +The Raspberry Pi's DHCP offers will nominate itself as the gateway (i.e. default route) and DNS server. It will have to perform Network Address Translation ("MASQUERADE") for all traffic leaving my house (e.g. via home network or VPN).
 +
 +ExpressVPN also tunnels DNS traffic, and *blocks* attempts to use DNS other than its own. This is a good thing, but I cannot get ExpressVPN and ''openresolv'' to play nicely: updates to ''/etc/resolv.conf'' either don't happen, or don't take affect. So I'll simply uninstall ''openresolv'' and/or disable ''systemd-resolved''.
 ===== Setup ===== ===== Setup =====
  
vpn-rpi4.txt · Last modified: 2021/04/25 20:13 by robm