Configure a router on a subnet with LUCI

I'm sure this should be simple and asked before, but I must be using the wrong search terms.

I have 2 Openwrt routers. Main router connected to WAN is on 192.168.5.x. Second Openwrt router is on 192.168.6.x (which all my IOT things are connected to). I need to pass data between the 2 but cannot see how to set this up with Luci.

Wiring is LAN (main router 5.x) to WAN (IOT router 6.x)

I can connect to the IOT router via the 192.168.5.x IP is is assigned.

this is the way

then it's not running with the default config, WAN port is firewalled.

Thanks. Sorry, I don't understand the answer - sorry. I can access Luci on the IOT router as I have allowed external access to Luci.

I have a feeling I need a static route from 5.x to 6.x via the static address the IOT router is on. But it doesn't work :frowning:

You have to open up the firewall of the IOT router: forward traffic from wan to lan on the iot router.

Or make it more specific for only your main route with these rules:

config rule
	option name 'allow_forward'
	option src 'wan'
	option dest '*'
	option target 'ACCEPT'
	list src_ip '192.168.5.0/24'
	option enabled '1'

config rule
	option name 'allow_input'
	option src 'wan'
	option target 'ACCEPT'
	list src_ip '192.168.5.0/24'
	option enabled '1'

On the main router you have to make a static route like:
ip route add 192.168.6.0/24 via 192.168.5.X #(wan ip address of IOT router)

what do you want to achieve ?
allow .5.x network to access the .6.x network ?

is .6.x network to have any restrictions when trying to talk to the .5.x network ?

Yes just simply pass all traffic between the 2.

I really just want to use the UI.

Not sure what you want

if there aren't any restrictions, shouldn't the 2nd router be a https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/bridgedap ?

1 Like

I want to be able to access 192.168.6.x (IOT device) from a computer on 192.168.5.x (main network)

Already gave you the answer to do that basically:
Open up the firewall of the secondary router
Set a static route on the main router

I think both of these are on the same subnet though in that guide?

1 Like

indeed, but if you have zero traffic restrictions, does it matter ?

I can't seem to get that right.

Yes too many IPs required :frowning:

more than 250 ? really ? :open_mouth:

Well it is getting close.

Yes that is done

1 Like

should be able to add an additional DHCP pool in dnsmasq, shouldn't you ?

Can I just find out how to set the static route, please?