This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vpn-pi [2020/04/29 16:37] robm [DHCP & DNS Services] |
vpn-pi [2020/04/29 16:54] (current) robm |
||
---|---|---|---|
Line 13: | Line 13: | ||
< | < | ||
- | Forever: | + | Forever: Disabling the service |
- | + | ||
- | Disabling the '' | + | |
===== Configure WiFi settings ===== | ===== Configure WiFi settings ===== | ||
Line 25: | Line 23: | ||
iface wlan0 inet static | iface wlan0 inet static | ||
address 172.16.0.1/ | address 172.16.0.1/ | ||
- | nohook wpa_supplicant | + | nohook wpa_supplicant |
</ | </ | ||
Line 43: | Line 41: | ||
===== DHCP & DNS Services ===== | ===== DHCP & DNS Services ===== | ||
+ | |||
+ | Disable the default '' | ||
+ | |||
+ | It's important that '' | ||
+ | |||
+ | < | ||
+ | sudo systemctl disable --now systemd-resolved | ||
+ | </ | ||
< | < | ||
Line 57: | Line 63: | ||
--dhcp-range=172.16.0.10, | --dhcp-range=172.16.0.10, | ||
--except-interface=eth0 \ | --except-interface=eth0 \ | ||
- | --bind-interfaces \ | ||
--dhcp-authoritative \ | --dhcp-authoritative \ | ||
+ | --log-queries \ | ||
--clear-on-reload | --clear-on-reload | ||
</ | </ | ||
- | |||
- | Notes: | ||
- | |||
- | * '' | ||
Later on, we'll want to move these settings into ''/ | Later on, we'll want to move these settings into ''/ | ||
Line 147: | Line 149: | ||
Then try to connect from another device (e.g. mobile phone). The WiFi network should be visible, and when you connect you should get an IP address, but probably an error about no internet connection. That's next. | Then try to connect from another device (e.g. mobile phone). The WiFi network should be visible, and when you connect you should get an IP address, but probably an error about no internet connection. That's next. | ||
+ | |||
+ | ===== Network Address Translation ===== | ||
+ | |||
+ | Enable Network Address Translation (NAT) on any traffic that leaves us via ExpressVPN' | ||
+ | |||
+ | Note that the interface doesn' | ||
+ | |||
+ | < | ||
+ | iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE | ||
+ | </ | ||
+ | |||
+ | Note that is this is the **only** MASQUERADE rule (check with '' | ||
+ | |||
+ | < | ||
+ | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | ||
+ | </ | ||
+ |