shorewall_code/Shorewall2/DropBcast
teastep aa7e0cdbeb Initial revision
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1103 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
2004-01-31 16:11:22 +00:00

18 lines
508 B
Bash

#!/bin/sh
#
# Shorewall 2.0 /etc/shorewall/DropBcast
#
# System-provided user exit for adding rules to the DropBcast chain
# created by the DropBcast action (action.DropBcast)
qt iptables -A DropBcast -m pkttype --pkt-type broadcast -j DROP
if ! qt iptables -A DropBcast -m pkttype --pkt-type multicast -j DROP; then
#
# No pkttype support -- do it the hard way
#
for address in $(find_broadcasts) 255.255.255.255 224.0.0.0/4 ; do
run_iptables -A DropBcast -d $address -j DROP
done
fi