While hosting a hidden service, e.g. a website on port 5678 from a device with a local ip address of 126.96.36.199 and a public ip4 address of the gateway of 188.8.131.52, I noticed that if one is connected to the same, semi-public wifi netwerk, one is able to connect to the "hidden" website simply on the local ip address 184.108.40.206:5678.
It is quite possible that random people see what the local devices, that are also connected to this wifi, are hosting on any open ports. Hence they may (accidentally) find the hidden service locally. This is assumed undesirable, hence I was wondering:
Is there a way to block website access to (the website/hidden service on) port 5678 from all but tor-exit nodes on Ubuntu Server 20.04 LTS?