middleware
middleware copied to clipboard
Make rsyslog support IPv6 destinations
I noticed that the current rsyslog-ng implementation was buggy and didn't support IPv6 destinations.
Entering an IPv6 IP as the syslog server failed due to input validation (both with the [] around the IP and without), and entering a hostname still only made it connect using IPv4.
This PR should fix that issue.
The regex for the input validation in the syslog server textbox has been changed to allow colons, percent signs and brackets [] as well which are needed for IPv6 adresses, and the template that creates the syslog-ng config has been modified to add the "ip-protocol(6) parameter.
According to the documentation this parameter defaults to "4" making it only send data to IPv4 destinations, but setting it to "6" makes it support both IPv4 and IPv6 destinations, under the condition that the OS kernel supports IPv6 (i.e., a "ping6 ::1" must work, which is probably the case for all Truenas installations).
My tests seem to confirm that, so with that change syslog-ng can send to both IPv4 and IPv6 destinations (both using a direct IP or using a hostname).
Can one of the admins verify this patch?
Any update here yet?
@Leseratte10 sorry for the delay. I've assigned a ticket to this and have put it into the queue for review. Hoping to get to this soon!
Jira URL: https://ixsystems.atlassian.net/browse/NAS-129269
This PR has been merged and conversations have been locked. If you would like to discuss more about this issue please use our forums or raise a Jira ticket.