root / manifests / rules / samba.pp @ 9d1ee648
Historique | Voir | Annoter | Télécharger (636 octets)
1 | 4470f70c | Giuseppe Lo Presti | # @summary manage Samba, the suite to allow Windows file sharing on Linux resources. |
---|---|---|---|
2 | 64404839 | Tim Meusel | # |
3 | # @param ctdb Enable ctdb-driven clustered Samba setups |
||
4 | # @param action if the traffic should be allowed or dropped |
||
5 | # |
||
6 | e743f82e | Giuseppe Lo Presti | class nftables::rules::samba ( |
7 | Boolean $ctdb = false, |
||
8 | 64404839 | Tim Meusel | Enum['accept', 'drop'] $action = 'accept', |
9 | e743f82e | Giuseppe Lo Presti | ) { |
10 | a6f61c62 | Giuseppe Lo Presti | nftables::rule { |
11 | 'default_in-netbios_tcp': |
||
12 | 64404839 | Tim Meusel | content => "tcp dport {139,445} ${action}", |
13 | a6f61c62 | Giuseppe Lo Presti | } |
14 | |||
15 | nftables::rule { |
||
16 | 'default_in-netbios_udp': |
||
17 | 64404839 | Tim Meusel | content => "udp dport {137,138} ${action}", |
18 | a6f61c62 | Giuseppe Lo Presti | } |
19 | |||
20 | 354a82d9 | Giuseppe Lo Presti | if $ctdb { |
21 | e743f82e | Giuseppe Lo Presti | nftables::rule { |
22 | 'default_in-ctdb': |
||
23 | 64404839 | Tim Meusel | content => "tcp dport 4379 ${action}", |
24 | e743f82e | Giuseppe Lo Presti | } |
25 | a6f61c62 | Giuseppe Lo Presti | } |
26 | } |