Keep in mind that the Raspberry Pi itself is not within the containers range as it is a physical device with an IP already. This is so it doesn't interfere with the range of addresses we give our Docker containers on the Raspberry Pi. You can organize this however you like but the most important thing is that you set the range of addresses your router is assigning devices with DHCP. One range where you have your physical devices with fixed IPs, one with all the dynamic devices being assigned with DHCP and the third one which is you docker containers. We will then need to decide on three ranges. I will assume your router (DHCP server) is assigning addresses with a format of 192.168.1.XXX, with the router itself on 192.168.1.1, the 192.168.1.0/24 subnet. Unless you know differently I'd say you have some devices that have fixed IP addresses (either static or reserved in your DHCP server) and some that you just connect on the fly. We'll do that with something called macvlan, so your router sees AdGuard Home as a physical device with its own MAC address.įirst we need to decide what IP ranges our devices and services will have on our network. Since we are running AdGuard inside a container we need to connect the internal container network with the normal one you have at home, from your router. So no copy/paste of commands as you did above □ but don't worry, I'll tell you how.ĪdGuard Home needs a static IP assigned to it which accessible from all your devices so they can use that address as the DNS server. One important thing which actually needs some manual work from you is setting up the static IPs for AdGuard and the (future) other containers. Because ~/ usually is the default when login in through ssh you don't need to change location when managing containers. Your home directory would probably be fine as this file will have the configuration for all your docker containers in it. Now to the fun part, creating a Docker Compose file containing everything we need for running the service.Ĭreate a new file called docker-compse.yml somewhere handy. If everything went well you should be able to check the version with docker-compose -version. We pick arm64 since that is the architecture of the Raspberry Pi 4. Set up the Docker repositoryįirst step is to add the Docker repository because it's the most up to date. As well as Docker Compose for easier configuring of the container and network, especially when we add more containers later on. To be able to install AdGuard Home as a Docker container we first need to set up Docker itself. sudo apt update and sudo apt upgrade, then we can reboot and head over to the next step. When the OS is installed and you have logged in over ssh for the first time it's a good idea to update all the packages. The installation steps are pretty much default for installing an OS on a removal drive, but the official guide is here. Navigate to the Ubuntu download page and download the latest LTS 64-bit release. Since this is a server without a GUI I decided to go with Ubuntu instead of Raspberry Pi OS, but it really doesn’t matter what you choose. There is a company behind it, but the software is completely free and open source so not really much to complain about. The reason I’m not going with PiHole is the better interface and out-of-the-box solutions like encrypted DNS upstream servers you get with AdGuard Home. Just remember that this is not a replacement of uBlock Origin, you need both. This solution will work for all devices like your TV and smart home devices… if you really need them connected at all. Blocking trackers, analytics and privacy infringing ads on a DNS level is a great way to make it network wide since ad blockers like uBlock Origin only blocks this kind of stuff in the browser. The first service we will add to the Raspberry Pi is a DNS server, AdGuard Home, running in its own docker container. Separating physical devices this way can increase security and portability, even though containers and virtual machines makes the difference smaller. My Synology NAS will then take care of pure file related tasks like backups and media management. I’ve decided to use mine for some network related stuff since the fourth version has gigabit Ethernet. Unless you need a lot of processing power it’s good enough to run as a small home server. The Raspberry Pi is a great little computer you can use for many different things. □ □ server adguard docker privacy dns raspberry pi
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |