Accidently deleted OPKG folder

Could you assist me in reconfiguring the Ethernet port to function as the WAN interface?

root@OpenWrt:/# cat /etc/config/network

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 'fd23:2a98:2298::/48'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'dhcp'
	option ipaddr '192.168.1.199'
	option netmask '255.255.255.0'
	option ip6assign '60'

For your reference

Enable WiFi first and then use it to connect to the pi for the rest.

Remove eth0 from br-lan.
Create a new interface called wan (lowercase) using eth0 and proto dhcp. That will be associated with the wan firewall zone.

Reboot.

This is wrong here, but this will actually be fine (instead of making the Ethernet port into the wan). Just remove the last two lines.

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 'fd23:2a98:2298::/48'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'dhcp'

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

Like this ?

1 Like

Close. But you need to give the lan interface an address (proto static). Maybe 192.169.5.1 with a subnet mask of 255.255.255.0

root@OpenWrt:/# cat /etc/config/network

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 'fd23:2a98:2298::/48'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.169.5.1'
	option netmask '255.255.255.0'  
	

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


Hope this is fine !!

Remove the last line of the br-lan

Often, if there are no physical ethernet ports assigned, it can be helpful to add this line:

	option bridge_empty '1'

but aside from those two thigns, your file looks fine now

1 Like