|Summary:||[request] make syslogd(8) bind to multiple specific IPs|
|Component:||bin||Assignee:||Stanislav Sedov <stas>|
|Severity:||Affects Only Me||CC:||eugen, gonzo, lidl, stas|
Description spork 2011-07-30 08:40:08 UTC
Recently many daemons that had a long history of only being able to bind to all available IPs have been modified to accept a runtime flag to allow binding to one or more specific IPs. With the wide use of FreeBSD in environments where the host may be on multiple networks (internal, external, management, etc.) and with jails becoming more common, it's becoming necessary for any service to be able to bind to one or more specific IPs. Firewalls can of course block access for traffic entering on unwanted interfaces, but jails present an issue with binding to all available IPs - if you run the same service in a jail, that service cannot bind since the jail's host is using the IP. mountd, nfsd, rpcinfo and others have been changed to allow the administrator to specify either a single IP to bind to (-h option) or a list of IPs to bind to (multiple -h options). syslogd does have the "-b" option, but it only can be called once. If the administrator passes multiple "-b" options, the last one specified is the only one syslogd binds to. Fix: Steal code from other udp daemons that support this. :) How-To-Repeat: Start syslogd with multiple "-b" options. It will only bind to the last one in the argument list.
Comment 1 Kurt Lidl 2014-12-09 20:24:16 UTC
Created attachment 150408 [details] implement support for multiple -b options
Comment 2 Kurt Lidl 2014-12-09 20:25:46 UTC
I had to implement this functionality at work a couple of months ago. I attached the patch we have been using.
Comment 3 commit-hook 2015-06-16 22:26:41 UTC
A commit references this bug: Author: rpaulo Date: Tue Jun 16 22:26:23 UTC 2015 New revision: 284474 URL: https://svnweb.freebsd.org/changeset/base/284474 Log: syslogd: support multiple -b options. It's now possible to bind multiple sockets to different IP addresses. PR: 159305 Submitted by: Kurt Lidl <lidl pix.net> Sponsored by: Pi-Coral, Inc. Changes: head/usr.sbin/syslogd/syslogd.8 head/usr.sbin/syslogd/syslogd.c
Comment 4 Eitan Adler 2018-05-28 19:43:48 UTC
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 5 Oleksandr Tymoshenko 2019-01-19 20:05:47 UTC
Stas, can this PR be closed now? Thanks
Comment 6 Eugene Grosbein 2019-10-31 09:16:59 UTC
The fix is present in all supported branches for long time.