summaryrefslogtreecommitdiff
path: root/manifests/interface.pp
blob: 1716a7e472a0e24a4a63f31df38bbca5a4f3b3aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
define shorewall::interface(
    $zone,
    $broadcast = 'detect',
    $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
    $rfc1918 = false,
    $dhcp = false,
    $order = 100
){
    if $rfc1918 {
        if $dhcp {
            $options_real = "${options},dhcp"
        } else {
            $options_real = $options
        }
    } else {
        if $dhcp {
            $options_real = "${options},norfc1918,dhcp"
        } else {
            $options_real = "${options},norfc1918"
        }
    }

    shorewall::entry { "interfaces-${order}-${name}":
        line => "${zone} ${name} ${broadcast} ${options_real}",
    }
}