-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ossec-authd fails to start when IPv6 is disabled on the OS (Linux) #917
Comments
On Tue, 9 Aug 2016, mostlyhacking wrote:
Does getaddrinfo work at all when you disable IPv6? Are you using the Antonio Querubin |
Everything else seems to work fine, including ossec itself. RHEL6 |
On Tue, 9 Aug 2016, mostlyhacking wrote:
If instead of disabling IPv6 completely (which may be breaking fundamental Antonio Querubin |
Enabling IPv6 resulted in ossec-authd binding to the IPv6 inteface, which is not what I need. So, I disabled IPv6 support in OSSEC by changing line 52 to "hints.ai_family = AF_INET;". This not optimal, but seems to work so far. |
Will using <local_ip></local_ip> in ossec.conf work for you instead of modifying the source? Sent from my iPad
|
Oh wait, that only applies to clients I think. Sent from my iPad
|
I have same problem on SLES12 SP1 OSSEC 2.9.0rc2, but with me both remoted and authd won't start if ipv6 is disabled. Everything else seems to work without problem.
|
Has anyone found a workaround for this? Alternatively, I'll take a method to generate and distribute agent keys via ansible, which seems like a better way to manage this. |
Upon some further reading, I'm confused by the comment in the above linked line 52, which says, "Allow IPv4 and IPv6" But that is clearly not the case
Shouldn't the authd process also be listening on IPv4? I am happy to open an additional bug to address that specific question but I suspect the causes are closely related. |
On Wed, 8 Feb 2017, mattwwarren wrote:
Upon some further reading, I'm confused by the comment in the above
linked [line
52](https://github.com/ossec/ossec-hids/blob/master/src/os_net/os_net.c#L52),
which says, "Allow IPv4 and IPv6"
But that is clearly not the case
`[root@(ossec)(cde-pilot)(us-west-2b) ~]# lsof -P | grep LISTEN
sshd 2402 root 3u IPv4 10417 0t0 TCP *:22 (LISTEN)
sshd 2402 root 4u IPv6 10422 0t0 TCP *:22 (LISTEN)
ossec-aut 2713 root 3u IPv6 11688 0t0 TCP *:1515 (LISTEN)`
Shouldn't the authd process also be listening on IPv4?
I am happy to open an additional bug to address that specific question
but I suspect the causes are closely related.
See RFC 3493, particularly sections 3.5-3.7, regarding use of a single
socket and IPv4-mapped IPv6 addresses for backward compatibility with
IPv4.
On most OS, opening a single IPv6 socket is all that's needed to accept
connections on both IPv4 or IPv6 addresses. However, not all OS comply
with RFC 3493. Those that do not comply by default, eg. FreeBSD, usually
provide some kind of knob that restores RFC compliance. In FreeBSD for
example, setting ipv6_ipv4mapping="YES" in /etc/rc.conf restores RFC-3493
compliance.
Regardless of whether an OS is enabled for IPv4-mapped addresses, an
application can explicitly choose to create and bind to separate IPv4 and
IPv6 sockets if the developer wishes to do things that way for whatever
reasons. You can see this is the approach taken by sshd in your output
dump above.
…--
Antonio Querubin
e-mail: tony@lavanauts.org
xmpp: antonioquerubin@gmail.com
|
@aquerubin |
Is there any update on if this is planned to be reverted/patched? |
@martydelaney3 Did pull request #1259 not help with this at all? |
I'm running ossec-hids/ossec-hids-server version 2.9.2. |
From a quick look at the source, I don't think it was included in 2.9.2. Testing it with master would be great. |
I'm attempting to test this but after installing from source, attempting to run ossec-authd gives me the error "ERROR: Not compiled. Missing OpenSSL support." |
I didn't have any issues using CentOS 7.3. Fresh VM, fresh checkout.
|
After recreating vms and recompiling from scratch I am now able to start ossec-authd on the server installation. |
Is there any progress on this bug ? As mentioned by martydelaney3, IPv6 is disabled for security issue, so I'm looking for new release or any workaround for this. |
@phamvuong Have you tried MASTER? |
@ddpbsd thank you very much for your reply. I have tested on master and it works well now. However, my system does not allow to compile from source. Do you have any release plan for this bug ? |
I just backported this into the 2.9.3 branch, we're working up a release for this now |
It's been a couple months since the last update on this issue. Can we please get an ETA on a fixed release? It seems like packages in the repo still exhibit this error. |
I believe this was fixed in the latest release but the repos may not be up to date.
Tony
… On Feb 15, 2018, at 16:24, rob cascella ***@***.***> wrote:
It's been a couple months since the last update on this issue. Can we please get an ETA on a fixed release? It seems like packages in the repo still exhibit this error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@packetfairy You're still seeing this issue with 2.9.3? Does it work with master? |
As mentioned in this comment, the fix has been merged but not included in 2.9.3 |
Thanks. |
Thank you for the fix in 2.9.3. It seems it doesn't work for some ossec components. I observe the following log records:
I'm using Ubuntu 14.04 LTS and OSSEC 2.9.3
Anybody else observe the issue? |
Works fine with IPv6 enabled. When IPv6 is disabled completely, authd fails to start:
./ossec-authd -d -p 1515
ossec-authd: DEBUG: Starting ...
ossec-authd: INFO: Started (pid: 14459).
ossec-authd: DEBUG: Returning CTX for server.
getaddrinfo: Name or service not known
ossec-authd: Unable to bind to port 1515
Tested master branch on Ubuntu 14.04 and RHEL6. The 2.8.2 works fine.
The text was updated successfully, but these errors were encountered: