2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# Shorewall -- /usr/share/shorewall/action.Drop
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2017-02-06 19:52:31 +01:00
|
|
|
# The former default DROP common rules. Use of this action is now deprecated
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# This action is invoked before a DROP policy is enforced. The purpose
|
|
|
|
# of the action is:
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# a) Avoid logging lots of useless cruft.
|
|
|
|
# b) Ensure that certain ICMP packets that are necessary for successful
|
|
|
|
# internet operation are always ACCEPTed.
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-04-08 18:10:45 +02:00
|
|
|
# The action accepts six optional parameters:
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
|
|
|
|
# actions.
|
|
|
|
# 2 - Action to take with Auth requests. Default is to do nothing special
|
|
|
|
# with them.
|
|
|
|
# 3 - Action to take with SMB requests. Default is DROP or A_DROP,
|
|
|
|
# depending on the setting of the first parameter.
|
|
|
|
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
|
|
|
|
# A_ACCEPT depending on the first parameter.
|
2017-01-23 20:54:40 +01:00
|
|
|
# 5 - Action to take with late DNS replies (UDP source port 53). Default
|
2016-04-05 19:13:55 +02:00
|
|
|
# is DROP or A_DROP depending on the first parameter.
|
2016-04-08 18:10:45 +02:00
|
|
|
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
|
|
|
|
# depending on the first parameter.
|
2011-06-11 23:58:54 +02:00
|
|
|
#
|
2008-12-07 19:17:26 +01:00
|
|
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
|
|
|
#
|
|
|
|
###############################################################################
|
2017-02-06 19:52:31 +01:00
|
|
|
?warning "You are using the deprecated Drop default action. Please see http://www.shorewall.net/Actions.html#Default"
|
2011-06-11 17:34:37 +02:00
|
|
|
|
2016-03-15 20:06:32 +01:00
|
|
|
?if passed(@1)
|
2016-03-12 21:15:07 +01:00
|
|
|
?if @1 eq 'audit'
|
2016-04-08 18:10:45 +02:00
|
|
|
DEFAULTS -,-,A_DROP,A_ACCEPT,A_DROP,A_DROP
|
2016-03-12 21:15:07 +01:00
|
|
|
?else
|
|
|
|
?error The first parameter to Drop must be 'audit' or '-'
|
|
|
|
?endif
|
|
|
|
?else
|
2016-04-08 18:10:45 +02:00
|
|
|
DEFAULTS -,-,DROP,ACCEPT,DROP,DROP
|
2016-03-12 21:15:07 +01:00
|
|
|
?endif
|
2011-06-11 17:34:37 +02:00
|
|
|
|
2016-04-05 19:13:55 +02:00
|
|
|
#ACTION SOURCE DEST PROTO DPORT SPORT
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2009-01-28 20:49:12 +01:00
|
|
|
# Count packets that come through here
|
|
|
|
#
|
|
|
|
COUNT
|
|
|
|
#
|
2013-05-14 19:44:26 +02:00
|
|
|
# Special Handling for Auth
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2016-03-15 20:06:32 +01:00
|
|
|
?if passed(@2)
|
2012-12-21 23:00:05 +01:00
|
|
|
Auth(@2)
|
2013-05-14 19:44:26 +02:00
|
|
|
?endif
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
|
|
|
# ACCEPT critical ICMP types
|
|
|
|
#
|
2016-04-11 20:16:46 +02:00
|
|
|
# For IPv6 connectivity ipv6-icmp broadcasting is required so
|
|
|
|
# AllowICMPs must be before silent broadcast Drop.
|
|
|
|
#
|
2012-12-21 23:00:05 +01:00
|
|
|
AllowICMPs(@4) - - icmp
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
2017-02-15 19:16:20 +01:00
|
|
|
# Don't log broadcasts or multicasts
|
2016-04-11 19:47:11 +02:00
|
|
|
#
|
|
|
|
Broadcast(DROP,@1)
|
2017-02-15 19:16:20 +01:00
|
|
|
Multicast(DROP,@1)
|
2016-04-11 19:47:11 +02:00
|
|
|
#
|
2008-12-07 19:17:26 +01:00
|
|
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
|
|
|
# and just confuse people when they appear in the log.
|
|
|
|
#
|
2012-12-21 23:00:05 +01:00
|
|
|
Invalid(DROP,@1)
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
|
|
|
# Drop Microsoft noise so that it doesn't clutter up the log.
|
|
|
|
#
|
2012-12-21 23:00:05 +01:00
|
|
|
SMB(@3)
|
2016-04-08 18:10:45 +02:00
|
|
|
DropUPnP(@6)
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
|
|
|
# Drop 'newnotsyn' traffic so that it doesn't get logged.
|
|
|
|
#
|
2016-03-13 18:49:23 +01:00
|
|
|
NotSyn(DROP,@1) - - tcp
|
2008-12-07 19:17:26 +01:00
|
|
|
#
|
|
|
|
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
|
|
|
|
# the log.
|
|
|
|
#
|
2012-12-21 23:00:05 +01:00
|
|
|
DropDNSrep(@5)
|