borpin
January 8, 2025, 1:11pm
1
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.
borpin
January 8, 2025, 1:33pm
3
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
egc
January 8, 2025, 1:36pm
4
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 ?
borpin
January 8, 2025, 1:39pm
6
Yes just simply pass all traffic between the 2.
borpin
January 8, 2025, 1:39pm
7
egc:
with these rules:
I really just want to use the UI.
borpin
January 8, 2025, 1:43pm
10
I want to be able to access 192.168.6.x (IOT device) from a computer on 192.168.5.x (main network)
egc
January 8, 2025, 1:45pm
11
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
borpin
January 8, 2025, 1:46pm
12
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 ?
borpin
January 8, 2025, 1:48pm
14
I can't seem to get that right.
borpin
January 8, 2025, 1:49pm
15
Yes too many IPs required
borpin
January 8, 2025, 1:51pm
17
Well it is getting close.
should be able to add an additional DHCP pool in dnsmasq, shouldn't you ?
borpin
January 8, 2025, 1:55pm
20
Can I just find out how to set the static route, please?