Adding special firewall rules

    • OMV 2.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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.:

      Source Code

      1. 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!

      The post was edited 1 time, last by Kaercher ().

    • 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:

      Source Code

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