Create a Wifi hotspot which tunnels all the traffic elsewhere

Wouldn't it be great if your traffic gets tunneled elsewhere as soon as you connect to the Wifi network? This is better than configuring VPN on individual devices, as you only need to configure one device. Data leak is also less likely to happen. I have managed to make Google think that I am in Poland.

The idea is to install OpenVPN on a OpenWRT device, and bridge the OpenVPN interface with a real interface together. You can set up DHCP server on the OpenWRT device, or you can have the DHCP server installed on the OpenVPN server.

Prerequisite and assumption

  1. Have an OpenWRT enabled Wifi access point
  2. You have configured OpenVPN in TAP mode 1).
  3. You have configured NAT on the OpenVPN server 2).
  4. You have configured your own DNS server elsewhere 3).

Setting up an OpenVPN on OpenWRT

To be written…

Setting up an extra Wifi network on OpenWRT

  1. Under Network $\rightarrow$ Wifi $\rightarrow$ Wireless Overview $\rightarrow$, press Add.
  2. Under Interface Configuration $\rightarrow$ General Setup $\rightarrow$ Network $\rightarrow$, tick OpenVPN's interface. This bridges OpenVPN's interface with the new Wifi interface.
3) If not, you can use Google Public DNS, or Unbound DNS server