Generally it is very simple - you’ll remove the Ethernet port from be-lan, create a new wan interface, and assign the port to that wan interface.
We can give specifics based on the network config:
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
First and most critically -- make sure wifi is enabled and that you are making these changes while connected via wifi. You will be disabling the ethernet port from a lan perspective (and making it a wan), so you must have a way to connect -- wifi is how this will be done.
Remove the port from below and add a line for bridge empty
it'll look like this:
config device
option name 'br-lan'
option type 'bridge'
option bridge_empty '1'
Now, add the wan (note that it is lowercase -- this will make it so it 'just works'):
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
Reboot the device and connect the ethernet port to the upstream network -- it should get an IP via DHCP and start working as a normal router.
I just literally created this by quoting/editing the config you provided.
If you're asking how you can achieve the same thing -- it can be done via direct editing of the config file itself or via the UCI command-line, or using the LuCI web interface. Personally, I prefer direct editing of the text file for many of these things.
Thank you very much, I was able to do it, I didn't understand how to edit it, I downloaded the network file and uploaded it again and it started working, thank you.
That is a valid way to do it as well, however you can use a terminal and the ssh root@ip address command to access the device, then modify the network file live with the built in editor
“vi /etc/config/network”
To enter edit mode press the letter “i”
To navigate use the arrow keys
To leave edit mode press the “escape” key
To save your edit press “:w”
To leave the editor press “:q”