From 3b2e9795c597040264d516feb9ded505268f72f0 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Tue, 4 Oct 2016 20:28:12 +0200 Subject: [PATCH] Restrict vsftpd to the security.d.o IPs on mirror-anu --- modules/roles/manifests/security_mirror.pp | 18 ++++++++++++++++++ modules/xinetd/templates/service.erb | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/modules/roles/manifests/security_mirror.pp b/modules/roles/manifests/security_mirror.pp index 986b5ae29..048236266 100644 --- a/modules/roles/manifests/security_mirror.pp +++ b/modules/roles/manifests/security_mirror.pp @@ -11,6 +11,14 @@ class roles::security_mirror { mirror-umn => '2607:ea00:101:3c0b::1deb:215', default => '', } + $ftp_bind = $::hostname ? { + mirror-anu => '150.203.164.61', + default => '', + } + $ftp_bind6 = $::hostname ? { + mirror-anu => '2001:388:1034:2900::3d', + default => undef, + } include apache2::cache apache2::site { '010-security.debian.org': @@ -24,6 +32,16 @@ class roles::security_mirror { logfile => '/var/log/ftp/vsftpd-security.debian.org.log', max_clients => 200, root => '/srv/ftp.root/', + bind => $ftp_bind, + } + if ($ftp_bind6) { + vsftpd::site { 'security6': + banner => 'security.debian.org FTP server (vsftpd)', + logfile => '/var/log/ftp/vsftpd-security6.debian.org.log', + max_clients => 200, + root => '/srv/ftp.root/', + bind => $ftp_bind6, + } } rsync::site { 'security': diff --git a/modules/xinetd/templates/service.erb b/modules/xinetd/templates/service.erb index 981f5a2eb..c969b3367 100644 --- a/modules/xinetd/templates/service.erb +++ b/modules/xinetd/templates/service.erb @@ -1,3 +1,8 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + service <%= scope.lookupvar('service') %> { <%- if scope.lookupvar('bind') != '' -%> -- 2.20.1