OPNsense Active Directory MemberOf: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (47 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| + | =seclab-win2022= | ||
| + | *Das gibt unser Domain Controller | ||
| + | ;In der Virtualbox | ||
| + | *Import der Maschine | ||
| + | *Name: win2022 | ||
| + | *Netzwerk:Internes Netzwerk: SERVER | ||
| + | ;In der Maschine | ||
| + | *user: Administrator | ||
| + | *pass: 123Start$ | ||
| + | |||
| + | |||
| + | =Vorab= | ||
| + | Wir brauchen das Stammzertifikat der Domain | ||
| + | *\\win2022\Export | ||
| + | Das muss auf der Opnsense importiert werden | ||
| + | |||
| + | Der Name win2022.sec-labs.de muss von er Opnsense auflösbar sein. | ||
| + | |||
| + | '''Warnung: Beim kopieren entstehen Leerzeichen - Hier ist die OPNSense zickig''' | ||
| + | |||
=Adminuser in der AD mit automatischer Synchronistion= | =Adminuser in der AD mit automatischer Synchronistion= | ||
==Ldapuser== | ==Ldapuser== | ||
;Er wird zum Binden an den DC gebraucht | ;Er wird zum Binden an den DC gebraucht | ||
| − | CN=ldapuser,OU=Service,DC= | + | CN=ldapuser,OU=Service,DC=sec-labs,DC=de |
| + | ;Test von der Opnsense Konsole | ||
| + | ldapsearch -x -H ldaps://win2022.sec-labs.de -D "ldapuser@sec-labs.de" -w '123Start$' -b "DC=sec-labs,DC=de" "(sAMAccountName=hans)" sAMAccountName memberOf | ||
| + | |||
==Gruppe== | ==Gruppe== | ||
;Gruppe wo die Admins drin sein sollen | ;Gruppe wo die Admins drin sein sollen | ||
| − | CN=opnsense,OU=Groups,DC= | + | CN=opnsense,OU=Groups,DC=sec-labs,DC=de |
| + | '''Hinzufügen wenn sie nicht drin sind''' | ||
| + | |||
==User in der Admingruppe== | ==User in der Admingruppe== | ||
| − | + | ==Gruppe: opnsense== | |
| − | + | {| class="wikitable" | |
| − | + | ! Benutzer !! Domain !! Gruppe !! Passwort | |
| + | |- | ||
| + | | lili || sec-labs.de || opnsense || 8er-Bahn | ||
| + | |- | ||
| + | | xinux || sec-labs.de || opnsense || 123Start$ | ||
| + | |- | ||
| + | | hans || sec-labs.de || opnsense || Ick.werd.zun.Schwi | ||
| + | |} | ||
| + | |||
=Einbinden der AD= | =Einbinden der AD= | ||
*Sytem | *Sytem | ||
**Access | **Access | ||
***Server | ***Server | ||
| + | ****Add | ||
| + | {| class="wikitable" | ||
| + | ! Feld !! Wert | ||
| + | |- | ||
| + | | Descriptive name || win2022 | ||
| + | |- | ||
| + | | Type || LDAP | ||
| + | |- | ||
| + | | Hostname or IP address || win2022.sec-labs.de | ||
| + | |- | ||
| + | | Port value || 636 | ||
| + | |- | ||
| + | | Transport || TLS | ||
| + | |- | ||
| + | | Protocol version || 3 | ||
| + | |- | ||
| + | | Bind credentials || CN=ldapuser,OU=Service,DC=sec-labs,DC=de | ||
| + | |- | ||
| + | | Password || 123Start$ | ||
| + | |- | ||
| + | | Search scope || Entire Subtree | ||
| + | |- | ||
| + | | Base DN || DC=sec-labs,DC=de | ||
| + | |- | ||
| + | | Authentication containers || CN=Users,DC=sec-labs,DC=de | ||
| + | |- | ||
| + | | Extended Query || memberOf=CN=opnsense,OU=Groups,DC=sec-labs,DC=de | ||
| + | |- | ||
| + | | Initial Template || Microsoft AD | ||
| + | |- | ||
| + | | User naming attribute || sAMAccountName | ||
| + | |- | ||
| + | | Read properties || ☑ | ||
| + | |- | ||
| + | | Synchronize groups || ☑ | ||
| + | |- | ||
| + | | Constraint groups || ☐ | ||
| + | |- | ||
| + | | Limit groups || Nothing selected | ||
| + | |- | ||
| + | | Automatic user creation || ☑ | ||
| + | |- | ||
| + | | Match case insensitive || ☐ | ||
| + | |} | ||
| + | |||
| + | =Tester= | ||
| + | *System | ||
| + | **Access | ||
| + | ***Tester | ||
| + | ****Authentication Server: win2022 | ||
| + | ****Username: xinux | ||
| + | ****Password: 123Start$ | ||
| + | |||
| + | =Quelle für die Authentification auswählen= | ||
| + | *System | ||
| + | **Settings | ||
| + | ***Administration | ||
| + | ****Authentication | ||
| + | {| class="wikitable" | ||
| + | ! Feld !! Wert | ||
| + | |- | ||
| + | | Server || win2022, Local Database | ||
| + | |- | ||
| + | | Disable integrated authentication || ☐ | ||
| + | |- | ||
| + | | Sudo || No password | ||
| + | |- | ||
| + | | Sudo group || wheel | ||
| + | |- | ||
| + | | User OTP seed || Nothing selected | ||
| + | |- | ||
| + | | Deployment type || Production | ||
| + | |} | ||
| + | |||
| + | =Gruppe mit dem gleichen Namen anlegen= | ||
| + | *System | ||
| + | **Access | ||
| + | ***Groups | ||
| + | ;opnsense | ||
| + | =Danach Privilegien vergeben= | ||
| + | *System | ||
| + | **Access | ||
| + | ***Groups | ||
| + | ****Assigned Privileges (Select All) | ||
| + | {| class="wikitable" | ||
| + | ! Feld !! Wert | ||
| + | |- | ||
| + | | Defined By || user | ||
| + | |- | ||
| + | | gid || 2000 | ||
| + | |- | ||
| + | | Group name || opnsense | ||
| + | |- | ||
| + | | Description || | ||
| + | |- | ||
| + | | Privileges || All pages, Diagnostics: ARP Table, Diagnostics: Auth | ||
| + | |- | ||
| + | | Members || | ||
| + | |} | ||
| + | |||
| + | =Wieder zu den Servers= | ||
| + | *System | ||
| + | **Access | ||
| + | ***Servers | ||
| + | *****LDAP Server wählen | ||
| + | ******Und Gruppe Mappen | ||
| + | {| class="wikitable" | ||
| + | ! Feld !! Wert | ||
| + | |- | ||
| + | | Read properties || ☑ | ||
| + | |- | ||
| + | | Synchronize groups || ☑ | ||
| + | |- | ||
| + | | Default groups || opnsense | ||
| + | |- | ||
| + | | Constraint groups || ☐ | ||
| + | |- | ||
| + | | Limit groups || Nothing selected | ||
| + | |- | ||
| + | | Automatic user creation || ☑ | ||
| + | |- | ||
| + | | Match case insensitive || ☐ | ||
| + | |} | ||
| + | |||
| + | =User Synchronisieren= | ||
| + | '''Muss man wohl nicht mehr''' | ||
| + | |||
| + | Einfach einlogen | ||
| − | + | =Login= | |
| + | {| class="wikitable" | ||
| + | ! Feld !! Wert | ||
| + | |- | ||
| + | | Language || Default | ||
| + | |- | ||
| + | | Login shell || /bin/csh | ||
| + | |} | ||
| − | + | =Anmerkung= | |
| + | *Ich hatte das Problem das ich als Remote Admin keine Änderungen vornehmen kann. | ||
| + | *Es scheint ein Sicherheitsmechanismus zu sein. | ||
| + | *Diesen kann man deaktivieren in dem man folgende Zeile entfernt | ||
| + | *cd /conf | ||
| + | *cp config.xml config.xml.org | ||
| + | *vi /conf/config.xml | ||
| + | <user-config-readonly/> | ||
| + | ;Link | ||
| + | *https://github.com/opnsense/core/issues/3132 | ||
Aktuelle Version vom 18. Februar 2026, 10:33 Uhr
seclab-win2022
- Das gibt unser Domain Controller
- In der Virtualbox
- Import der Maschine
- Name: win2022
- Netzwerk:Internes Netzwerk: SERVER
- In der Maschine
- user: Administrator
- pass: 123Start$
Vorab
Wir brauchen das Stammzertifikat der Domain
- \\win2022\Export
Das muss auf der Opnsense importiert werden
Der Name win2022.sec-labs.de muss von er Opnsense auflösbar sein.
Warnung: Beim kopieren entstehen Leerzeichen - Hier ist die OPNSense zickig
Adminuser in der AD mit automatischer Synchronistion
Ldapuser
- Er wird zum Binden an den DC gebraucht
CN=ldapuser,OU=Service,DC=sec-labs,DC=de
- Test von der Opnsense Konsole
ldapsearch -x -H ldaps://win2022.sec-labs.de -D "ldapuser@sec-labs.de" -w '123Start$' -b "DC=sec-labs,DC=de" "(sAMAccountName=hans)" sAMAccountName memberOf
Gruppe
- Gruppe wo die Admins drin sein sollen
CN=opnsense,OU=Groups,DC=sec-labs,DC=de
Hinzufügen wenn sie nicht drin sind
User in der Admingruppe
Gruppe: opnsense
| Benutzer | Domain | Gruppe | Passwort |
|---|---|---|---|
| lili | sec-labs.de | opnsense | 8er-Bahn |
| xinux | sec-labs.de | opnsense | 123Start$ |
| hans | sec-labs.de | opnsense | Ick.werd.zun.Schwi |
Einbinden der AD
- Sytem
- Access
- Server
- Add
- Server
- Access
| Feld | Wert |
|---|---|
| Descriptive name | win2022 |
| Type | LDAP |
| Hostname or IP address | win2022.sec-labs.de |
| Port value | 636 |
| Transport | TLS |
| Protocol version | 3 |
| Bind credentials | CN=ldapuser,OU=Service,DC=sec-labs,DC=de |
| Password | 123Start$ |
| Search scope | Entire Subtree |
| Base DN | DC=sec-labs,DC=de |
| Authentication containers | CN=Users,DC=sec-labs,DC=de |
| Extended Query | memberOf=CN=opnsense,OU=Groups,DC=sec-labs,DC=de |
| Initial Template | Microsoft AD |
| User naming attribute | sAMAccountName |
| Read properties | ☑ |
| Synchronize groups | ☑ |
| Constraint groups | ☐ |
| Limit groups | Nothing selected |
| Automatic user creation | ☑ |
| Match case insensitive | ☐ |
Tester
- System
- Access
- Tester
- Authentication Server: win2022
- Username: xinux
- Password: 123Start$
- Tester
- Access
Quelle für die Authentification auswählen
- System
- Settings
- Administration
- Authentication
- Administration
- Settings
| Feld | Wert |
|---|---|
| Server | win2022, Local Database |
| Disable integrated authentication | ☐ |
| Sudo | No password |
| Sudo group | wheel |
| User OTP seed | Nothing selected |
| Deployment type | Production |
Gruppe mit dem gleichen Namen anlegen
- System
- Access
- Groups
- Access
- opnsense
Danach Privilegien vergeben
- System
- Access
- Groups
- Assigned Privileges (Select All)
- Groups
- Access
| Feld | Wert |
|---|---|
| Defined By | user |
| gid | 2000 |
| Group name | opnsense |
| Description | |
| Privileges | All pages, Diagnostics: ARP Table, Diagnostics: Auth |
| Members |
Wieder zu den Servers
- System
- Access
- Servers
- LDAP Server wählen
- Und Gruppe Mappen
- LDAP Server wählen
- Servers
- Access
| Feld | Wert |
|---|---|
| Read properties | ☑ |
| Synchronize groups | ☑ |
| Default groups | opnsense |
| Constraint groups | ☐ |
| Limit groups | Nothing selected |
| Automatic user creation | ☑ |
| Match case insensitive | ☐ |
User Synchronisieren
Muss man wohl nicht mehr
Einfach einlogen
Login
| Feld | Wert |
|---|---|
| Language | Default |
| Login shell | /bin/csh |
Anmerkung
- Ich hatte das Problem das ich als Remote Admin keine Änderungen vornehmen kann.
- Es scheint ein Sicherheitsmechanismus zu sein.
- Diesen kann man deaktivieren in dem man folgende Zeile entfernt
- cd /conf
- cp config.xml config.xml.org
- vi /conf/config.xml
<user-config-readonly/>
- Link