<div dir="ltr"><div>This is the system call that would be needed: <a href="http://man7.org/linux/man-pages/man2/setns.2.html">http://man7.org/linux/man-pages/man2/setns.2.html</a></div><div><br></div><div>Also, there's a veth device that can be simpler: <a href="http://man7.org/linux/man-pages/man4/veth.4.html">http://man7.org/linux/man-pages/man4/veth.4.html</a></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 28, 2020 at 12:22 PM Balazs Scheidler <<a href="mailto:bazsi77@gmail.com">bazsi77@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I think this shouldn't be more difficult than a setsockopt() provided syslog-ng has the appropriate permissions. <div dir="auto"><br></div><div dir="auto">also, if dns settings are not the same, that might complicate things.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 28, 2020, 09:58 Monitto Pitchaimani sebastin (mopitcha) <<a href="mailto:mopitcha@cisco.com" target="_blank">mopitcha@cisco.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-IN">
<div>
<p class="MsoNormal"><span>Hi Gabor, <u></u><u></u></span></p>
<p class="MsoNormal"><span>Thanks for the reply.<u></u><u></u></span></p>
<p class="MsoNormal"><span>My use case is that syslog-ng is running in one namespace but I wanted to send the logs to the remote server which is reachable in another namespace.<u></u><u></u></span></p>
<p class="MsoNormal"><span>Can we specify the outgoing namespace in destination network() in syslog-ng configuration.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span>Monitto <u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">syslog-ng <<a href="mailto:syslog-ng-bounces@lists.balabit.hu" rel="noreferrer" target="_blank">syslog-ng-bounces@lists.balabit.hu</a>> on behalf of Nagy Gábor <<a href="mailto:gabor.hl@gmail.com" rel="noreferrer" target="_blank">gabor.hl@gmail.com</a>><br>
<b>Reply to: </b>Syslog-ng users' and developers' mailing list <<a href="mailto:syslog-ng@lists.balabit.hu" rel="noreferrer" target="_blank">syslog-ng@lists.balabit.hu</a>><br>
<b>Date: </b>Monday, 27 April 2020 at 9:11 PM<br>
<b>To: </b>Syslog-ng users' and developers' mailing list <<a href="mailto:syslog-ng@lists.balabit.hu" rel="noreferrer" target="_blank">syslog-ng@lists.balabit.hu</a>><br>
<b>Subject: </b>Re: [syslog-ng] Syslog-ng network namespace support<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Sorry if I misunderstood your question.<br>
Do you mean does syslog-ng use Linux namespaces?<br>
<a href="http://man7.org/linux/man-pages/man7/namespaces.7.html" rel="noreferrer" target="_blank">http://man7.org/linux/man-pages/man7/namespaces.7.html</a><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">AFAIK it does not.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">If you mean that a remote host(e.g. server) has network namespaces, I think that should work, as that's transparent to a different host (e.g. client).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Can you elaborate your use case, please?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">It's possible that we should submit a feature request on syslog-ng github page:<br>
<a href="https://github.com/syslog-ng/syslog-ng/issues/" rel="noreferrer" target="_blank">https://github.com/syslog-ng/syslog-ng/issues/</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Gábor<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Monitto Pitchaimani sebastin (mopitcha) <<a href="mailto:mopitcha@cisco.com" rel="noreferrer" target="_blank">mopitcha@cisco.com</a>> ezt írta (időpont: 2020. ápr. 27., H, 17:22):<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi All,<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:rgb(36,39,41);background:white none repeat scroll 0% 0%">Does syslog-ng supports log forwarding to remote host in different network namespaces?</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Regards,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Monitto</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">
https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">
http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>

______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Bazsi</div>