Blocking external traffic to OMV UI on the built in nginx

  • I'm hosting a docker service on my OMV that is meant to have public access. I previously had set the OMV UI to a separate port so that I could set a public facing nginx container that would proxy to my service to listen on 80 and 443.


    This works okay enough but requires some redundant stuff (two nginxes mainly) also stops working if docker is down. I would rather just modify the built in nginx to handle the public service traffic. I would add these rules to /etc/nginx/sites-available/openmediavault-webgui in the `location` block:


    ```

    allow 10.23.0.0/24;

    allow fd73::/16;

    deny all;

    satisfy all;

    ```


    And then add my public service to conf.d


    But of course OMV will overwrite this file periodically and remove that, exposing my OMV to the world.


    Is there a way I can add those rules and keep it consistent even after an overwrite?

    • New
    • Official Post

    requires some redundant stuff (two nginxes mainly) also stops working if docker is down

    Two nginx instances serving two sites uses barely any more resources than one instance serving two locations.

    Why would docker be down?

    Is there a way I can add those rules and keep it consistent even after an overwrite?

    Not easily. Having the OMV web interface on a different port is much safer. Then the port forwarding rules on the router can never forward to OMV's port. Having internet facing things in a docker also gives the app another layer of protection from the host.

    omv 8.5.11-1 synchrony | 7.0 proxmox kernel

    plugins:

    omvextrasorg 8.0.3 | kvm 8.3.4 | compose 8.2.2 | cterm 8.0.4 | borgbackup 8.2.1 | tempmon 8.0.5 |

    mergerfs 8.0.2 | scripts 8.0.6 | writecache 8.3.0 | backup 8.1 | kernel 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!