<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Helvetica Neue";
panose-1:2 0 5 3 0 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Carlan,<o:p></o:p></p>
<p class="MsoNormal">If it helps, here’s what some of our users use for receiving on a local host and forwarding out to a docker container on that same host.<o:p></o:p></p>
<p class="MsoNormal">Also, I’m curious about “<span style="font-size:10.0pt;font-family:"Helvetica Neue"">identical issue with cisco traffic, since it's not RFC compliant” – why do you say that?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">(well, I agree that some of their stuff isn’t, but routers, switches and firewalls are as far as I know)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New""># Local forwarding to LogZilla NEO containers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""># Generated on Thu Jan 3 17:49:27 UTC 2019<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">options {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> chain_hostnames(off);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> flush_lines(10000);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> threaded(yes);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> use_dns(yes); # This should be set to no in high scale environments<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> use_fqdn(no);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> keep_hostname(yes);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> dns-cache-size(2000);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> dns-cache-expire(87600);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> use-dns(persist_only);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> dns-cache-hosts(/etc/hosts);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> owner("root");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> group("root");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> perm(0640);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> stats_freq(0);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> time_reopen(5);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">source s_local {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> system();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> internal();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">source s_rfc3164 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> network(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> transport("tcp")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> port(514)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> log-iw-size(20000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> );<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> network(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> transport("udp")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> so_rcvbuf(1048576)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> flags("no-multi-line")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> port(514)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> );<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">source s_rfc5424 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> network(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> transport("tcp")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> flags(syslog-protocol)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> port(601)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> );<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">destination d_rfc3164 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> tcp("localhost" port(32514));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">destination d_rfc5424 {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> tcp("localhost" port(32601));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">log {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> source(s_rfc3164);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> destination(d_rfc3164);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">log {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> source(s_rfc5424);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> destination(d_rfc5424);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">syslog-ng <syslog-ng-bounces@lists.balabit.hu> on behalf of Carlan Philippe <philrmls@yahoo.fr><br>
<b>Reply-To: </b>Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu><br>
<b>Date: </b>Saturday, February 23, 2019 at 8:09 PM<br>
<b>To: </b>Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu><br>
<b>Subject: </b>[syslog-ng] Syslog-ng setup for both RFC3164 and RFC5124<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">Hi all, <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">Is there a way to configure syslog-ng to process properly both RFC3164 and RFC5124 on the same listening port ? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">The scenario is a bunch of devices sending traffic to one syslog server port (both udp + tcp) with the senders typically not knowing what protocol they are sending. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">We are running syslog-ng 3.13 with this setup: <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">source s_syslog { udp(ip(0.0.0.0) port(514)) ; <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""> tcp(ip(0.0.0.0) port(514)); }<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""> If needed we could upgrade syslog-ng to 3.19.1 but having checked the doc for 3.19, it seems that the solution would be to create 2 source entries, 1 for RFC3164 with network()
and 1 for RFC5124 with syslog(). Neverthless, these 2 sources would have to listen on *different* ports and that is the problem for us.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">Note that we also have an identical issue with cisco traffic, since it's not RFC compliant, syslog-ng adds automatically a header with timestamp and hostname. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue"">Thank you. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica Neue""> <o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>