Allow traffic from Fastly to 5141 instead and set up syslog-ng rules
authorTollef Fog Heen <tfheen@err.no>
Mon, 7 Aug 2017 16:30:18 +0000 (18:30 +0200)
committerTollef Fog Heen <tfheen@err.no>
Mon, 7 Aug 2017 16:30:38 +0000 (18:30 +0200)
modules/ferm/manifests/per_host.pp
modules/syslog_ng/templates/syslog-ng.conf.erb

index 7dca252..6b4fcea 100644 (file)
@@ -46,7 +46,7 @@ class ferm::per_host {
                        }
                        @ferm::rule { 'fastly-syslog':
                                description     => 'Allow syslog access',
-                               rule            => '&SERVICE_RANGE(tcp, 5140, $HOST_FASTLY)'
+                               rule            => '&SERVICE_RANGE(tcp, 5141, $HOST_FASTLY)'
                        }
                }
                kaufmann: {
index 6a3688c..89c77ed 100644 (file)
@@ -132,6 +132,16 @@ source s_network {
 };
 <%- end -%>
 
+<%- if (@hostname == "lully") -%>
+source s_network_fastly {
+       tcp6(port(5141) max-connections(100)
+               tls( key_file("/etc/exim4/ssl/thishost.key")
+                    cert_file("/etc/exim4/ssl/thishost.crt")
+                    peer-verify(optional-untrusted))
+       );
+};
+<%- end -%>
+
 
 ######
 # destinations
@@ -557,3 +567,11 @@ log { source(s_local);
       source(s_network);
       filter(f_syslog); destination(df_ALL_syslog); };
 <%- end -%>
+
+<%- if (@hostname == "lully") -%>
+destination fastly { file("/var/log/fastly.log" };
+
+log { source(s_network_fastly);
+      destination(fastly); };
+
+<%- end -%>