I'm new here, I hope I'm in the right place. I'm also new to networking at this level of complexity and this might be a stupid question, so sorry in advance. For reasons, I have a nas (synology) with ethernet only which I cannot connect to the wired network of the place where it is, so I'm setting up a raspberry pi to act as a router/internet connection sharing device to bring the nas on the network via wifi. This is the setup:
workplace(wifi) <---> rpi(wifi, dhcp)---rpi(dhcp server, firewalld)---rpi(ethernet) <---> nas(ethernet, dhcp)
I have managed to configure both wifi and ethernet connections properly, set up the dhcp server properly (on eth0), and enable masquerading on firewalld so that the nas can get to the internet. The nas is supposed to host, among other things, a web server, so I need to forward ports 80 and 443 directly to the nas. Here is where my problems start. How firewalld is configured right now:
- both wlan0 and eth0 are in the public zone (default zone)
- masquerading enabled for the public zone
- services http and https enabled for the public zone
As soon as I forward port 80 this way:
firewall-cmd --zone=public --add-forward-port=port=80:proto=tcp:toport=80:toaddr=NAS_IP
The NAS webserver is visible from other machines in the workplace network, but the nas itself doesn't have internet access anymore, as any http request is redirected to its own webserver, rather than the internet. If I remove the port forward the connectivity comes back, but of course I cannot access the webserver anymore.
I know that an easy solution would be to move the webserver to a different port, but I really want to keep it on port 80 to make things easy for the users. I've read this bug report that looks like the issue I'm having, but it also looks like it's been solved already (although the version installed on the system is 0.6.3, so I'm not entirely sure about that). I would like to know if this is a bug in the program, or if I've just been dumb with my configuration (e.g. the two interfaces are not supposed to be in the same zone, or something similar). Thanks for any help provided.