I'm attempting to forward some ports for my NAS, but when I try to forward port 80, it breaks my web access to luci. My router IP is 192.168.0.4, and my NAS is 192.168.0.10, and I discovered that the other ports I forwarded, such as 5001, are redirected from the router IP (that is, when I go to 192.168.0.4:5001, it displays the NAS' web UI), so that would explain why forwarding port 80 breaks luci, but why is this happening in the first place?
Here is an excerpt from /etc/config/firewall
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp udp'
option src_dport '5001'
option dest_ip '192.168.0.10'
option dest_port '5001'
option name 'Synology Moments'
I assumed that this would make it so that when I navigate to :5001 that the traffic would forward to the NAS (but I get a connection refused error when I do this). I can post other configs or screenshots of my setup, but I'm not sure what else would be relevant. Maybe my interfaces?
This should not happen if the defined source is on the WAN and you are testing this from the LAN.
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
It seemed like it was in some sort of redirect loop, that's all I know.
From the LAN
Not sure what you mean about the source being on the WAN. I'm currently only testing from LAN and connecting to LAN devices. I don't know why I'd get NAS web ui at my router's address
Your LAN and WAN are on the same subnet. This will not work -- you must always have a different network on the LAN and on the WAN.
Your router cannot port forward in this context -- it is not able to route because of the subnets on both networks.
Can you draw a diagram of your network? A snapshot of a hand drawn diagram is perfectly sufficient.... please include any upstream routers and switches between the internet and you're NAS.
Is the router in that picture the OpenWrt router that you are trying to resolve in this situation? If so, it would seem that your modem is also a modem+router combo unit -- is that correct? If so, do you have the option to change that modem+router into a modem only (bridge mode) device?
The router is the OpenWrt device, and it is a separate device than the modem. I don't remember the details because I set it up over a year ago, but I cannot switch it to bridge mode, I need that vlan stuff
Ok... so if that is the case, you need to change your LAN address on the OpenWrt router to something other than 192.168.0.0/24. You could make it 192.168.1.1 if you want.
Sure, I can make that happen, but it doesn't seem like it explains why when, after setting up port forwarding, I go to 192.168.0.4:5001 from my PC (192.168.0.21), it returns the same web page as 192.168.0.10:5001
Also, forgot to mention, the modem has the router configured as a DMZ, but that's probably not relevant to the above issue.
DMZ is important, but only relevant when the OpenWrt router is actually configured properly. Change your OpenWrt LAN and port forwarding should work as expected.
Thank you, the WAN subnet is now in the 192.168.1.0 range, and things a less weird. The remaining problems may be a separate issue, so I started a new topic at Dns resolution windows (hairpin?)
I assumed DMZ meant it would forward all traffic to the router, but this appears to be different functionality than port forwarding, so I disabled that.