Ability to select WAN interface

I have a usb LTE/4G dongle that is plugged in. It gets added as a interface, eth1. Want to be able to set it as the wan device.

I have changed it manualy in the LuCI interface, under network, interfaces, wan. The mobile apps shows no internet. SSH to the pi and it also has no internet.

Would it be possible to add a feature to set the wan to use either eth0 or eth1 ?

Can you show me the /etc/config/network file. Screenshot it /copy and paste it from SSH

cat /etc/config/network

here is the contents of the file

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdfa:b09e:00a0::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	option ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option force_link '1'
	option proto 'static'
	option ipaddr '10.9.141.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wwan'
	option proto 'dhcp'
	option metric '20'

config interface 'wan'
	option device 'eth1'
	option proto 'dhcp'

config interface 'wggb'
	option proto 'wireguard'
	option private_key 'xxxxxxxx'
	option disabled '0'
	option addresses 'xxxxxxxx'
	option dns 'xxxxxxxxx'

config wireguard_wggb
	option public_key 'xxxxxxxx'
	option private_key 'xxxxxxxxxxx'
	option persistent_keepalive '25'
	option disabled '0'
	list allowed_ips '0.0.0.0/1'
	list allowed_ips '128.0.0.0/1'
	option route_allowed_ips '1'
	option endpoint_host 'xxxxxxxxxx'
	option endpoint_port 'xxxxxx'
	option preshared_key 'xxxxxxxx'

Ok - at the moment I have particularly tested USB modems so it’s not quite supported

But the firmware is OpenWrt so I think that guides from there on how to get a USB modem online/working should also apply on this firmware. If you’re running a Pi5 that’s a snapshot build meaning not 100% of OpenWrt packages are working yet, but Pi4 is stable.

This looks like it might be a relevant starting point on how to configure it - [OpenWrt Wiki] Use cdc_ether driver based dongles for WAN connection

I think later it would be a good addition to have more support, or even app support, for USB 4G dongles or USB smartphone tethering - so will log it as a feature request for future development

1 Like

I am using a Pi4 at the moment.

Had a quick look at the link and that is not the same. I plugged the usb dongle in and it comes up as an ethernet divice. WIthout me doing anything.

From luci
image

This is where I changed it, under network, interfaces on luci
image

I am sure using a phone tethering, would do the same, or atleast from what I have seen. On windows/linux it setups a ehternet interface. eth0 is the physical lan port and eth1 is the usb that creates an ethernet port.

Hope it makes sense :grinning:

Just an update from myside.

All is working 100s now. Did a reboot and just worked out of its own. App shows not connect, but it is connected and wireguard connects as well.

Ok, glad to hear it it’s all working now!