Adding special firewall rules

  • Hi!


    I want to set up MAC-based iptable rules for parental control ( = lock out the kids after hours), e.g.:

    Code
    iptables -I INPUT -m mac --mac-source 00:11:22:33:44:55 -m time --timestart 19:0 --timestop 7:00 -j DROP

    I cannot do this with the GUI, and Openmediavault flushes the iptables when setting its own rules.
    Is there a way to put my rules in a startup script somewhere so that they are persistent?


    Thanks!

  • Found it on my own: I just leave all the source and destination fields in the "Add firewall rule" dialog empty and put my rule in "Extra options".
    Works great:

    Code
    Vault:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    DROP       all  --  anywhere             anywhere             MAC 00:11:22:33:44:55 TIME from 20:50:00 to 20:51:00 UTC

Jetzt mitmachen!

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