How to put multiple IP address (or Mac) in Firewall Traffic Rule

Hi

I am willing to create a new firewall rules to block my kids accessing internet during night. THere is a nice howto in the Wiki and in other places, but nowhere there was example on how to put several IP Address or IP Range as "Source Address".
Can I put

192.168.0.40,192.168.0.45,192.168.0.46-192.168.0.50

?
LUCI sounds angry and put the field in red... I am sure I am not the only one willing to apply the same rule to a range of IP or MAC

thanks

You may put IPs space separated (no comma) or in CIDR notation in LuCI. Range notation is not allowed atm.

The field will turn red intermittently but back to normal once the next IP has been typed out.

1 Like

ok, shame for range, but already good to be able to put several IPs

1 Like

It should be possible to use the iprange matching module I guess. At least it's in the repository.

iptables-mod-iprange - 1.6.2-1 - iptables extensions for matching ip ranges. Matches: - iprange

In this case use any in the Source and/or Destination address and then add "-m iprange" and "--src-range ip[-ip]" or "--dst-range ip[-ip]" to Extra arguments.

prange match options:
[!] --src-range ip[-ip]    Match source IP in the specified range
[!] --dst-range ip[-ip]    Match destination IP in the specified range