interface.pp 663 Bytes
Newer Older
1 2 3 4
define shorewall::interface(
    $zone,
    $broadcast = 'detect',
    $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
5
    $add_options = '',
6 7 8 9
    $rfc1918 = false,
    $dhcp = false,
    $order = 100
){
10 11 12
    $added_opts = $add_options ? {
        ''      => '',
        default => ",${add_options}",
13 14
    }

15 16 17 18 19 20 21 22
    $dhcp_opt = $dhcp ? {
        false   => '',
        default => ',dhcp',
    }

    $rfc1918_opt = $rfc1918 ? {
        false   => ',norfc1918',
        default => '',
23 24
    }

Micah Anderson's avatar
Micah Anderson committed
25
    shorewall::entry { "interfaces-${order}-${name}":
26
        line => "${zone} ${name} ${broadcast} ${options}${dhcp_opt}${rfc1918_opt}${added_opts}",
27 28 29
    }
}