I'm looking to redirect requests for
192.168.1.6:8123 at the router level.
This is for Home Assistant setup. I have SSL certificates and everything already working but the last thing I'm hoping to do is not have to type the port number when accessing the server.
It's unclear whether this is even possible. This thread seems to have the answer.
It points to the uhttpd config file settings. However, the original poster said he got it working but didn't specify what settings he added to the config and it's not obvious to me what to do after reading the docs.
Maybe @Flamingi is still around to answer? If not, can someone else point in the right direction?
So long as the device sits on another VLAN, you can do this with a simple NAT, tbh.
Thanks for the comment @lleachii. That would be awesome. Can you expand a bit?
If it were simple for me I wouldn't have asked.
Assuming your LAN == 192.168.1.0/24 and router is 192.168.1.1
You server is e.g. 192.168.112.0/24 and it's IP is 192.168.112.5
- Using any RFC1918 address you're not using (e.g. 172.16.0.1) make a NAT
- If from LAN to 172.16.0.1 at 80/tcp
- Redirect to 192.168.112.5 8123/tcp
I should note, in any case, you have to traverse the router/firewall for anything to work, so this is why I suggested a simple NAT rule.
Also, this is why the device cannot be 192.168.1.6 as you would not cross a network boundary for the OpenWrt to handle the traffic...unless the the OP of the other thread did some kinda Ethernet filtering to accomplish it (which still means it passed interfaces on said device).
OK, I see what you are saying.
That would take a lot more changes to my setup.
I guess I'll give up on this for now. Thanks.