![]() ![]() Why don’t we use the usual Alpine image? Because we are developing our project over a Raspberry Pi Zero W, which processor is an ARMv6, so we need a base image that is compatible with that platform. On the first line we inherit from arm32v6/alpine.# Configure Hostapd (default will be open)ĪDD confs/hostapd_confs/nf /etc/hostapd/nfĪDD confs/nf /etc/dhcp/nfĪDD confs/interfaces /etc/network/interfacesĪDD confs/iptables_off.sh /iptables_off.sh RUN apk update & apk add hostapd iw dhcp vim iptables To define the Docker image we will create a new file named Dockerfile with the following content: from arm32v6/alpine ![]() Inside it, we can create a confs folder that will contain the configuration files that will be put into the image, and then another folder hostapd_confs inside it, with configurations related to the access point service itself. We will create a directory for the project with any name we cant. Once we have installed the former dependencies, we can start to construct our Docker image, from which we will build our containers later. We will also install docker-compose, a toll that will help us manage containers later, by getting some dependencies and using Pip for the installation of the tool itself: apt-get install libffi-dev libssl-devĪt this point, we have met all the requirements to continue our little project □ We can do this automatically by downloading and executing the official installation script: curl -sSL | sh In order to avoid problems with dhcpcd service, which in Raspbian and other modern Linux systems is the servicec that manages the network interface autoconfiguration via DHCP, we will add the following line into /etc/nf, making the service ignore the wireless interfaces wlan0 (but still manage the wired interface eth0): denyinterfaces wlan0Īlso, we will obviously have Docker to be installed into our system. In case the returned value is 0, we must activate it with: sysctl _forward=1Īnd in order to make the change persistent, we have to make sure that the following line on /etc/nf exists and is not commented out: # Uncomment the next line to enable packet forwarding for IPv4 In any case, we can check if this feature is enabled on almost any distribution with the command: sysctl _forward In my case, as usual, I use Raspbian on my Raspberry Pi Zero W. We must make sure that IPv4 Forwarding is enabled on our operating system, which allows the redirection of packets between different attached networks. ![]() Given that we will be using a Docker container to manage dependencies and configurations, prerrequisites are few, but still exist. I will leave you here the link to the GitLab repository where I have published the project: In this case, we will take our dropbox further and gather the tools inside a Docker container, so tools, dependencies and network configuration are made available quickly and automatically. In both cases we made use of a Raspberry Pi 3, whose wireless interface allowed us to quickly create a highly portable access point using hostapd to create the access point and isc-dhcp-server as a DHCP server. You might remember former posts about the topic, like Hiding the Rabbit or the first part of project AIRE (so sorry, those are spanish only!). Hello everyone!! I’m back with a little post about how to easily automate the creation of an wireless access point, taking advantage of the portability of a Raspberry Pi Zero W and Docker containers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |