How to build a router with Raspberry PI
The tutorial will build a router with Raspberry PI 3B, where the build-in Wifi and ethernet ports are LAN ports and a usb dongle D-link DWA-171 for connecting to Internet
The following things are required:
- Internet access. Can be wired or wireless. It’s used to install necessary packages
- A TF card. for Pi storage
- Pi 3B
Steps
System Installation
- Download Ubuntu 22.04 Server for Pi (As the time of writing). For 3B, use 64bit system.
- Write the downloaded file to a TF card
- Install Ubuntu to PI, no special config required. The default username/password are ubuntu/ubuntu. It will be created on the first bootup. Just wait for some time.
- Login, update the system
apt update
apt upgrade
Dongle driver installation
- Install driver for DWA-171. 3B
https://github.com/aircrack-ng/rtl8812au
git clone <https://github.com/aircrack-ng/rtl8812au>
cd rtl8812au
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
sudo make dkms_install
removing and re-installing the driver may be required after upgrading the system, especially kernel upgrade
- If the driver is properly installed, a new interface should show up by
ip a