I'm currently working on a little hobby project with my Raspberry Pi 2 and I'm not sure how to proceed. I have basic knowledge of Linux but i still have much to learn.
What I'm trying to accomplish is to have my pi act as a proxy to my laptop. My Pi will have Pi-Hole(https://pi-hole.net) running as well as OpenVPN once i got Pi-Hole to run
My plan is to have everything setup like this:
[Laptop]--eth0-->[Pi-Hole]--wlan0-->[Router]-->Internet
My laptop will be connected to the pi via Ethernet cable and the pi will then forward the traffic over wlan0 to my router which is connected to the internet. My Pi is running Raspbian stretch lite since i will be using it headlessly. Once I manage to run Pi-Hole correctly and filter out some of the garbage, I will install openVPN to make sure my traffic is protected.
Here is where i have issues. dhcp seems to messing up my interfaces file, if i disable dhcp the pi becomes unreachable and I'm not sure how to fix that. I'm not sure if any significant changes been made to the networking between jessie and stretch.. I understand that once i disable dhcp then we need to specify how the pi i supposed to connect to the internet.
I set my interfaces file like this:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
adress 192.168.1.99
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
and then i just removed dhcp
sudo apt-get remove dhcpcd5 isc-dhcp-client isc-dhcp-common
Since I'm running headless it means that when this does not work the pi becomes unreachable once i reboot. Ssh just time-out, my router does not show any connections from the static IP and a ping from my laptop shows the host is unreachable. I just reflashed the SD card and am now back where i started.
What did i do wrong/not understand/miss and how do i fix it? Also, any pointers to good resources or things i should lookup when working on this project? Any advice would be helpful and if it works well once completed, i'll make sure to post the full process somewhere so that others can make use of it as well.
Thank you for taking the time to read my question.
Cheers!
dhcp
is causing your (unstated) problem - probably due to the obsolete and incompleteinterfaces
. You then remove the default network managerdhcpcd
and thedhcp
client as well - do you expectwlan0
to be assigned an address? Stretch DOES NOT havewlan0
oreth0
by default (unless you modify settings).