X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fnfs-server%2Fmanifests%2Finit.pp;h=68ed1c4ab1efa73942fc87cebbf065460973ba5b;hb=15e69db99fe328e094705ef868e638c31122f864;hp=a9e4758d7157afe8fa81e3521067e7c42af55482;hpb=96d02de0e841b2a067dba244d62562cd46d4035b;p=dsa-puppet.git diff --git a/modules/nfs-server/manifests/init.pp b/modules/nfs-server/manifests/init.pp index a9e4758d..68ed1c4a 100644 --- a/modules/nfs-server/manifests/init.pp +++ b/modules/nfs-server/manifests/init.pp @@ -16,30 +16,42 @@ class nfs-server { status => '/bin/true', } + case $::hostname { + lw01,lw02,lw03,lw04: { + $client_range = '10.0.0.0/8' + } + milanollo: { + $client_range = '172.29.122.0/24' + } + beach,glinka: { + $client_range = '192.168.2.0/24' + } + default: { + # Better than 0.0.0.0/0 - we really ought to configure a + # client range for them all instead of exporting to the world. + $client_range = '127.0.0.0/8' + } + } + @ferm::rule { 'dsa-portmap': - domain => '(ip ip6)', description => 'Allow portmap access', - rule => '&TCP_UDP_SERVICE(111)' + rule => "&TCP_UDP_SERVICE_RANGE(111, $client_range)" } @ferm::rule { 'dsa-nfs': - domain => '(ip ip6)', description => 'Allow nfsd access', - rule => '&TCP_UDP_SERVICE(2049)' + rule => "&TCP_UDP_SERVICE_RANGE(2049, $client_range)" } @ferm::rule { 'dsa-status': - domain => '(ip ip6)', description => 'Allow statd access', - rule => '&TCP_UDP_SERVICE(10000)' + rule => "&TCP_UDP_SERVICE_RANGE(10000, $client_range)" } @ferm::rule { 'dsa-mountd': - domain => '(ip ip6)', description => 'Allow mountd access', - rule => '&TCP_UDP_SERVICE(10002)' + rule => "&TCP_UDP_SERVICE_RANGE(10002, $client_range)" } @ferm::rule { 'dsa-lockd': - domain => '(ip ip6)', description => 'Allow lockd access', - rule => '&TCP_UDP_SERVICE(10003)' + rule => "&TCP_UDP_SERVICE_RANGE(10003, $client_range)" } file { '/etc/default/nfs-common':