Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-129269 / 24.10 / Make rsyslog support IPv6 destinations #13440

Merged
merged 1 commit into from
May 29, 2024

Conversation

Leseratte10
Copy link
Contributor

@Leseratte10 Leseratte10 commented Mar 29, 2024

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

@pcbsd-commit-bot
Copy link

Can one of the admins verify this patch?

@Leseratte10
Copy link
Contributor Author

Any update here yet?

@yocalebo
Copy link
Contributor

@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 yocalebo added jira and removed jira labels May 29, 2024
@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Make rsyslog support IPv6 destinations NAS-129269 / 24.10 / Make rsyslog support IPv6 destinations May 29, 2024
Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@themylogin themylogin merged commit afc6823 into truenas:master May 29, 2024
@bugclerk
Copy link
Contributor

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.

@truenas truenas locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants