NethServer Version: NethServer release 7.9.2009 (final) Module: samba DC version 4.9.18
How can i (re)enable TLS/STARTTLS in Nethserver AD?
I think this was enabled some Times ago but if i try to connect an FreePBX to the Nethserver AD (nethserver-freepbx or external FreePBX) i found that this is only possible without TLS/STARTTLS.
I know, that i have disabled the auth-strong setting in the smb config of AD some time ago (because testing anything).
And i can see, that in the DB the sssd StartTls is marked as disabled.
I have tried to reenabled this via changing the db entry to “enabled”, reconfigure with /etc/e-smith/events/actions/system-adjust, renew the Letsencryp cert and restart.
But after then some connections wasn’t more possible to services (SOGo).
(the Nethserver connection itself to the Ad seems to be correct)
Is the “StartTls” flag enabled in general while new Nethserver/AD installations? Or was this disabled before in older installations? (i think i installed the Nethserver AD at Nethserver 7.5)
I’d like to connect a freepbx to the Nethserver AD but in a secure way.
Which is the best way to re-enable this without loosing AD informations?
Before i try it again, there is a question:
This db settings are for the connection from Nethserver itself to an internal/external AD Provider, right?
So changing this settings to StartTls=enabled will only work if the Nethserver AD itself (machines/ndsc) can connect via StartTLS/SSL, or?
How can i check to see that the AD Provider itself is TLS enabled?
Thank you for helping.
I have tried now both of your (adjusted) commands from three different local machines (debian, macos and nethserver itself) with unclear results:
I don’t understand this “invalid Credentials” lack because the used password is the same as shown in in Nethserver Cockpit > Account Provider.
I have also done a portscan again the account provider which shows the relevant ports are open:
Open TCP Port: 53 domain
Open TCP Port: 88 kerberos
Open TCP Port: 135 epmap
Open TCP Port: 139 netbios-ssn
Open TCP Port: 389 ldap
Open TCP Port: 445 microsoft-ds
Open TCP Port: 464 kpasswd
Open TCP Port: 636 ldaps
Open TCP Port: 3268 msft-gc
Open TCP Port: 3269 msft-gc-ssl
Open TCP Port: 49152
Open TCP Port: 49153
Open TCP Port: 49154
You’re right, but the “forced” starttls via -ZZ option results in the same “Invalid Credentials” Error.
Correction:
My -ZZ option was on the wrong place. (it is definitely to late today…)
On Nethserver it works with -ZZ option to “-H ldap://ad.domain.tld” and to “-h IPv4 -p 389”.
But it didn’t works on port 636.
Meanwhile i have “successful” enabled the Nethserver connection to its own AD. I have enabled TLS this in the db and then run signal-event nethserver-sssd-update (and a restart). After that, the AD connection seemst to be “ok”, the user and group section shows users and groups and the connection from services like sogo runs normal without password problems (like yesterday).
But i am still not sure, that the connection between Nethserver and the AD is secured by TLS.
Alls tests from other machines works only via IP (the -h option) and to port 389 (without -ZZ option).
The FreePBX “Directory” Connection also only works without SSL or STARTTLS.
Thank you very much for lead me to this guide.
But i am not sure to have an fqdn for my AD provider which can be resolved via an external dns.
After read this guide i unterstand my certificate error as (please correct me),
that a “untrusted” cert on my AD provider ist the reason for my problems with connecting external clients or apps?
Maybe this is an “Newbee” question, but can i manual “trust” this “untrusted” AD certificate on the client machines (for Example an FreePBX)?
It could be for some NAS or Java apps, from my experience.
Another way would be to disable strong auth. Just for testing if your clients can connect without encryption to exclude other issues. From the wiki (go to AD section):
Edit /var/lib/machines/nsdc/etc/samba/smb.conf and add following line to [global] section:
ldap server require strong auth = no
Restart samba (AD):
systemctl -M nsdc restart samba
Some implementations provide an option to allow self signed certs, I don’t know how freepbx handles it but I don’t think it’s needed for freepbx, I’m going to check when I find time.
“Strong Auth” ist already disabled in the nsdc container, this is over from some radius, mattermost, whatever experiments.
Is there a “typical” way to “renew” the cert/password pair of the nsdc container? Is this manual needed in cases like expiration, changes in strengt or tls versions or something? As i can see, the AD cert expired in some months.
I think the samba AD uses the self-signed cert from Neth by default, so it should be renewed if you edit the self-signed cert.
There’s no official way yet, only the script for LE certs that get renewed automatically.