WAN port forwarding to LAN1 to OpenWRT - TP-Link TL-WR-841N
During a thunderstorm, the WAN port on the TP-Link TL-WR-841N burned out. In this situation, it is possible to designate one of the LAN ports as WAN. In the stock firmware, unfortunately, you cannot reassign the ports, so we switch to an alternative firmware.
The first step is to download the OpenWRT firmware for your router model, and start the firmware process.
Upon completion of the update, go to 192.168.1.1 and get to the updated web interface of the router.
Reassign the WAN port
To do this, go Network - Switch and create two vlan 1 looks tagged on the CPU and untagged on the port that wants to become a new WAN, 2 vlan tagged on the CPU and untagged on all the remaining ports.
Please note that Port 1 listed as the new WAN is actually port 4 of the router.
Click Save & Apply
Creating a new NEW WAN interface
The next step is to open Network - Interfaces, delete the old WAN and create a new NEW WAN interface and direct it to VLAN Interface: "eth1.1" and configure the connection, for example PPPoE .
Go back to Network - Interfaces, click edit LAN.
On the Physical Settings tab, set the check boxes opposite:
- VLAN Interface: "eth1.2"
- Wireless Network: Master "OpenWrt" is WiFi
Configuring Firewall
Open Network - Firewall, edit WAN in the Covered networks: New Wan section, enable everything on the General Settings tab, click Save & Apply.
Click System - Reboot and check.
The second option is to forward the WAN port through the console
Example from a 5-port router:
# uci get network.eth0_0.ports
1 2 3 4 5
# uci get network.eth0_1.ports
0 5
You can view the current appointment like this:
uci get network.eth0_0.ports
uci get network.eth0_1.ports
View all network settings:
uci show network