middleware icon indicating copy to clipboard operation
middleware copied to clipboard

Make rsyslog support IPv6 destinations

Open Leseratte10 opened this issue 10 months ago • 2 comments

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).

Leseratte10 avatar Mar 29 '24 16:03 Leseratte10

Can one of the admins verify this patch?

pcbsd-commit-bot avatar Mar 29 '24 16:03 pcbsd-commit-bot

Any update here yet?

Leseratte10 avatar May 23 '24 18:05 Leseratte10

@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!

yocalebo avatar May 29 '24 12:05 yocalebo

Jira URL: https://ixsystems.atlassian.net/browse/NAS-129269

bugclerk avatar May 29 '24 12:05 bugclerk

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.

bugclerk avatar May 29 '24 16:05 bugclerk