Using OpenWrt as "translator"

Hello,

I want to access the web interface of a device with a "wired", unchangeable IP (192.168.1.1), which I'd like to integrate into my network (192.168.178.x).
My idea is that I can use OpenWrt to "translate" between my net and the ip of the device, so that I can type in an ip (192.168.178.xxx) and land on the web interface of the device.
At the moment, for test purposes, I have a TP Link CPE510 outdoor accesspoint and successfully installed openwrt on it (18.06.4).
Also I was able to integrate it into my wlan and can access it with luci.
But I lack the knowlege to build it as the device I need it to be.
Can someone point me into the right direction?

This is pretty straight forward. You need to:
a) Set the device up with the WAN connection on your main 192.168.178.x network
b) Configure the LAN network to 192.168.1.x
c) Make sure the LAN DHCP range does not include 192.168.1.1 (I believe by default it starts at .100 but you'd have to check to be sure)
d) Default firewall settings should work as required, with NAT being performed between the two networks. So all you need to do is add a port forwarding rule that sends traffic on whatever port you chose to your target device 192.168.1.1 on port 80.

Should all easily be doable through LuCI, just do a bit of googling for basic setup instructions if you need them. Essentially all you're doing is NAT between the two networks with a port forwarding rule so that you can pull up the web interface of your device from the WAN side of the OpenWRT unit.

This is the default, but you have to change x to something other than 1 on the OpenWrt router.

Hello,

thanks for all the info.
I prepared my setup as described.
Unfortunately, it doesent work.
The wlan is set correctly with the name "wwan".
It has the ip 192.168.178.125.
Lan is set with the ip 192.168.1.2.
I created a port forward rule "From IP 192.168.178.125 in wan with source port 5000
Via IP 192.168.178.125 at port 5000" forward to "IP 192.168.1.1, port 80 in lan".
When I try to open the address in the browser "192.168.178.125:5000" I get a "not reachable" message.
What did I wrong?

My error was that the source port 5000 was in use.
I changed it to port 5555 and now I can access the webinterface via 192.168.178.125:5555.

Yay!

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