How to Access Luci of the other network? Luci not in same network


If my house have 2 networks. First one for using internet, Second one for testing ,update and etc. I am lazy to re-plug Ethernet port toggle between them everytime.

So, if my laptop is in 192.168.4.x network and
I want to access to Luci of 192.168.1.x such as 4th router.
I can access Luci of 3rd router only via Wan 192.168.4.242 but it can't with 192.168.1.1 . I have already allowed firewall forward from Wan->Lan and Lan>Wan in 3rd router.
It seems they are looking for 192.168.1.2 from main router first and then go to the internet. Ofcouse it won't find any Luci there.
How to setup (alternative gateway or whatever called)openwrt that when I am using browser for 192.168.1.1 or 192.168.1.2 . Just look for 3rd and 4th router and display Luci and when I looking for others number Just go to default gateway as usual.

On the third router set a port forward to 192.168.1.1 to get to luci of the third router and a port forward to 192.168.1.2 to get to luci of the fourth router:

This is the rule to access the third router at 192.168.4.242:8080
/etc/config/firewall

config redirect
	option dest 'wan'
	option target 'DNAT'
	option name 'Allow-httpv4v6'
	option src 'wan'
	option src_dport '8080'
	option dest_port '80'
	option family 'any'
	list proto 'tcp'

this is the rule to access the fourth router at: 192.168.4.242:8081

config redirect
	option dest 'lan'
	option target 'DNAT'
	option name 'fourth router'
	list proto 'tcp'
	option src 'wan'
	option src_dport '8081'
	option dest_ip '192.168.1.2'
	option dest_port '80'
2 Likes

Yes , it's working great. I copied the script and pasted to /etc/config/firewall. Also set Masquerading on Lan.
I will try to config by Luci to do the same thing,too.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.