iptables config location - docker

  • Hi All

    As per the subject - enabling docker brings in legacy iptables which I'm fine with as I have a load of them I need to import and save. I use iptables-persistent and save my rules in /etc/iptables/rules.v4.


    I've cleared all iptables rules I had set manually using this method and installed docker/portainer using the UI.


    I now have some basic rules and chains including docker. Which file are the saved in and how can I add my other iptables rules to this?


    Thanks

    • Offizieller Beitrag

    Which file are the saved in and how can I add my other iptables rules to this?

    The only thing the plugin does is switch to iptables-legacy (if you use the iptables menu but this is not done by default). Switching back and forth shouldn't change the file you create. The rules OMV creates when you use the firewall tab in network is /etc/iptables/openmediavault-firewall.sh and it is the only thing OMV touches. If you want things to work the OMV way, you should create your rules in the web interface.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

  • Ok thanks - I'm seeing something I can't seem to explain.


    There is no omv firewall rules file in etc/iptables.


    I haven't created a single rule in the OMV interface and I don't have any rules created manually at the moment (I cleared them all out), but docker install from the OMV gui has created firewall rules which show when I do iptables -L. Where are these being created and stored ?


    output of iptables -L:

    I'm using the latest OMV 5 fully updated. Thanks

    • Offizieller Beitrag

    Where are these being created and stored ?

    As I mentioned in my post, they are created in the /etc/iptables/openmediavault-firewall.sh script. Try creating a rule from the web interface and you will see them there. Make sure to click Save in the firewall tab though.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    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!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!