Puppet Class: postfix::reject_bogus_ip

Defined in:
manifests/reject_bogus_ip.pp

Summary

configure an reject_bogus_ip table

Overview

The generated table will contain entries to reject invalid and private network addresses.

Parameters:

  • manage_default_entries (Any) (defaults to: true)

    By default the table will contain a default preset. Set to false to disable default preset.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'manifests/reject_bogus_ip.pp', line 10

class postfix::reject_bogus_ip (
  $manage_default_entries = true,
) {
  $etc_dir = $::postfix::install::etc_dir
  $path = "${etc_dir}/reject_bogus_ip.cidr"

  postfix::postmap { $path:
    description => 'reject private address ranges',
    type        => 'cidr',
  }

  if( $manage_default_entries ) {
    postfix::reject_bogus_ip::row { '0.0.0.0/8':
      message => 'Bogus NS/MX in broadcast network',
      comment => 'IPv4 networks'
    }
    postfix::reject_bogus_ip::row { '10.0.0.0/8':
      message => 'Bogus NS/MX in RFC 1918 private network',
    }
    postfix::reject_bogus_ip::row { '127.0.0.0/8':
      message => 'Bogus NS/MX in loopback network',
    }
    postfix::reject_bogus_ip::row { '169.254.0.0/16':
      message => 'Bogus NS/MX in link lokal network',
    }
    postfix::reject_bogus_ip::row { '172.16.0.0/12':
      message => 'Bogus NS/MX in RFC 1918 private network',
    }
    postfix::reject_bogus_ip::row { '192.0.2.0/24':
      message => 'Bogus NS/MX in TEST-NET network',
    }
    postfix::reject_bogus_ip::row { '192.168.0.0/16':
      message => 'Bogus NS/MX in RFC 1918 private network',
    }
    postfix::reject_bogus_ip::row { '198.18.0.0/15':
      message => 'Bogus NS/MX in RFC 2544 benchmark network',
    }
    postfix::reject_bogus_ip::row { '224.0.0.0/4':
      message => 'Bogus NS/MX in class D multicast network',
    }
    postfix::reject_bogus_ip::row { '240.0.0.0/5':
      message => 'Bogus NS/MX in class E reserved network',
    }
    postfix::reject_bogus_ip::row { '248.0.0.0/5':
      message => 'Bogus NS/MX in reserved network',
    }

    postfix::reject_bogus_ip::row { '2000::/3':
      action  => 'DUNNO',
      order   => '60',
      comment => 'IPv6 networks'
    }
    postfix::reject_bogus_ip::row { '::/0':
      message => 'Bogus NS/MX not in 2000::/3',
      order   => '61',
    }
  }
}