Signed-off-by: Stephen Gran <steve@lobefin.net>
@include 'conf.d/';
+domain (ip ip6) {
+ table filter {
+ chain log_and_reject {
+ ULOG ulog-prefix "REJECT: ";
+ proto tcp REJECT reject-with tcp-reset;
+ REJECT;
+ }
+
+ chain log_or_drop {
+ mod hashlimit hashlimit-name ulogreject hashlimit-mode srcip hashlimit-burst 30 hashlimit 15/second jump log_and_reject;
+ mod hashlimit hashlimit-name uloglogdrop hashlimit-mode srcip hashlimit-burst 30 hashlimit 15/second ULOG ulog-prefix "DROP: ";
+ DROP;
+ }
+}
+
domain (ip ip6) {
chain INPUT {
policy DROP;
notify => Exec["ferm restart"];
}
+ ferm::rule {
+ domain => "(ip ip6)",
+ description => "Drop everything else",
+ prio => "99",
+ rule => "jump log_or_drop"
+ }
+
+
exec { "ferm restart":
command => "/etc/init.d/ferm restart",
refreshonly => true,