We will present how to configure the necessary configuration to transform the do OpenWRT + raspberry pi into a WIFI router.
So, following these steps, we can use our raspberry pi as a second router. Additionally, we can use it as a replacement for our wireless router.
This video shows how to separate the interfaces to create the routes between LAN and WAN.
In addition, we demonstrate how to perform the separation and isolation of the raspberry pi interfaces.
We present in detail all the steps to configure the raspberry pi and the OpenWRT. If you have questions, you can send messages on our youtube channel.
To install OpenWRT on raspberry pi, go to the post HERE. ou o VIDEO.
Checking the OpenWRT interfaces
Initially, let us check how the raspberry pi interfaces are mapped inside OpenWRT. To do this, we will access the top tab menu and NETWORK. Next, let us select INTERFACES.
Inside the interfaces page, we can see a LAN interface available. This interface bridges the interfaces destined for the LAN. Including the WIFI interface.
- Checking the OpenWRT interfaces
- Enabling the raspberry pi WIFI
- Connecting the raspberry pi LAN via WIFI interface
- Accessing the OpenWRT WEB interface via WIFI
- Removing the eth0 LAN interface from OpenWRT
- Adding the eth0 interface on the OpenWRT WAN
- Configuring OpenWRT routes and NAT
- Testing OpenWRT + Raspberry Pi internet access
- Demonstrating the next steps
Enabling the raspberry pi WIFI
In the next step, we will access the NETWORK menu and access WIRELESS. Next, let us click ENABLE on the Wireless interface.
So, let us enable the wireless interface. After enabling the Wifi, it will create a network with the SSID OpenWrt. However, this network is still unencrypted.
So let us enable encryption. To do this, let us click on EDIT. Then, a page with the wireless network settings will open.
Further down, we will select the WIRELESS SECURITY option. Soon after, we will choose the type of encryption.
In this case, we chose WPA2. After that, we will enter the password that will be used to gain access to the OpenWRT network.
After configuring the wireless network, let’s save the configuration and then click SAVE & APPLY. After that, OpenWRT will make the changes and save it in memory.
Connecting the raspberry pi LAN via WIFI interface
Before separating the interfaces, let us connect to the raspberry pi using the WIFI interface. For this, we will connect to the OpenWrt network.
Accessing the OpenWRT WEB interface via WIFI
Next, we will remove the ethernet cable connected to our computer, and we will stay connected to the raspberry pi only via wifi. After that, let us access the browser and retype the raspberry pi LAN IP. In this case, the IP is “192.168.1.1“.
Removing the eth0 LAN interface from OpenWRT
Now, let us separate the eth0 interface from the wireless interface. Therefore, let us go to the NETWORK menu and click on INTERFACES.
We can see that the wifi symbol now appears in the figure of the LAN interface.
This behavior occurs because OpenWRT makes a bridge between the eth0 interface and the wireless interface.
Now let us click on EDIT. Then, we will select only the Wireless interface in the DEVICES field.
In this way, the only interface on the LAN will be the WIFI interface of the raspberry pi.
After that, let us save the configuration by clicking SAVE.
Next, let us click on SAVE&APPLY.
Adding the eth0 interface on the OpenWRT WAN
It is time to create the WAN interface for our raspberry pi. Firstly, we must remember that this WAN interface will be the eth0 interface of the raspberry pi.
Therefore, we will connect this eth0 interface to the equipment providing internet access, for example, the gateway. Sometimes, the gateway may be a modem from our ISP or another router.
In this example, we are connecting the raspberry pi eth0 interface to the LAN interface of our router that receives a direct connection to the Internet.
So let us click ADD NEW INTERFACE.
Next, we will name the interface “newWAN” and then indicate that the interface will automatically receive IP via DHCP.
So, let us choose “DHCP Client”. After that, let’s select device = eth0; this indicates that the eth0 interface will be associated with the name “newWAN”.
After that, we will save the settings. After that, let’s click on SAVE&APPLY.
Configuring OpenWRT routes and NAT
Now, let us configure the necessary routes and zones. Initially, we can verify that the wireless interface is in the LAN zone.
Next, we need to include the “newWAN” interface in the WAN zone. Then, let us click on EDIT in the WAN zone part to do this.
Next, we will include the “newWAN” interface in the “COVERED NETWORKS” field.
After that, let’s save the settings and then click on SAVE&APPLY.
Testing OpenWRT + Raspberry Pi internet access
Once we’ve configured everything, we can test access to the internet.
Demonstrating the next steps
In future videos and articles, we intend to cover more OpenWrt modules within the raspberry pi.
Comment on our channel if you are interested in more topics about this.
- How to install OpenWrt on Raspberry Pi
- How to install Zabbix on Raspberry Pi
- SquidGuard: how to import blocklist?
- Snort PfSense : Detect DoS Attack
Juliana Mascarenhas
Data Scientist and Master in Computer Modeling by LNCC.
Computer Engineer
Tutorial how to Install and configure VNC on Ubuntu
Remote access has become an essential tool for managing servers and desktops, enabling administrators and…
Build Your Own DNS Server: A Step-by-Step Guide using BIND9
In this step-by-step guide, we’ll walk you through the entire process of setting up and…
Tutorial for SSH Public Key Authentication
In this tutorial, we will teach you how to create and configure access to an…
Socket UDP Python Chat
Tutorial for creating a simple chat using UDP sockets in Python 3. The goal is…
Socket TCP Python make a chat
Tutorial for creating a simple chat using TCP sockets in Python 3. The goal is…
apt get behind proxy
Over time, I have often come across the need to configure apt get to work…