Allgemein
Enterasys Logging & Debugging
0Kürzlich wurde ich von einem Kunden mit einem Problem konfrontiert das im Enterasys NetSight im Traplog immer wieder “Incorrect Community Name” auftaucht. SNMP war im NetSight korrekt konfiguriert. Der Kunde wollte wissen wer versucht auf dem Switch zuzugreifen per SNMP. In der Trap Meldung wird diese Information leider nicht mitgesendet. Die bekannten Debug Befehle die man von Cisco kennt gibt es nicht aber man kann den Enterasysgeräten auch einige Informationen entlocken wenn man weiß wo man suchen muss.
Man kann bei Enterasys das Loggingverhalten für verschiedene Systemdienste anpassen um mehr Informationen zu bekommen.
Mit dem Kommando “show logging application” oder kurz “sh logg app” angezeigt werden.
Hier eine Liste von den verschiedenen Switch Serien und Applications wo man das Logging ändern kann:
Enterasys B3 Serie:
Application Current Severity Level --------------------------------------------- 89 CLIWEB 6 90 SNMP 7 91 STP 6 92 Driver 6 93 System 7 94 Stacking 6 112 UPN 6 118 Router 6 1(emergencies) 2(alerts) 3(critical) 4(errors) 5(warnings) 6(notifications) 7(information) 8(debugging)
Enterasys C2 Serie:
Application Current Severity Level --------------------------------------------- 89 CLIWEB 6 90 SNMP 6 91 STP 6 92 Driver 6 93 System 6 94 Stacking 6 95 RtrOspf 6 96 RtrMcast 6 97 RtrVrrp 6 112 UPN 6 118 Router 6 1(emergencies) 2(alerts) 3(critical) 4(errors) 5(warnings) 6(notifications) 7(information) 8(debugging)
Enterasys N Serie:
Application Current Severity Level Server List ---------------------------------------------------------- 88 RtrAcl 6 1-8,console,file 89 CLI 6 1-8,console,file 90 SNMP 6 1-8,console,file 91 Webview 6 1-8,console,file 93 System 6 1-8,console,file 95 RtrFe 6 1-8,console,file 96 Trace 6 1-8,console,file 105 RtrLSNat 6 1-8,console,file 111 FlowLimt 6 1-8,console,file 112 UPN 6 1-8,console,file 117 AAA 6 1-8,console,file 118 Router 6 1-8,console,file 140 AddrNtfy 6 1-8,console,file 141 OSPF 6 1-8,console,file 142 VRRP 6 1-8,console,file 145 RtrArpProc 6 1-8,console,file 147 LACP 6 1-8,console,file 148 RtrNat 6 1-8,console,file 151 RtrTwcb 6 1-8,console,file 154 DbgIpPkt 6 1-8,console,file 158 HostDoS 6 1-8,console,file 180 RtrMcast 6 1-8,console,file 183 PIM 6 1-8,console,file 184 DVMRP 6 1-8,console,file 185 BGP 6 1-8,console,file 196 LinkFlap 6 1-8,console,file 199 Spoof 6 1-8,console,file 207 IPmcast 6 1-8,console,file 209 Spantree 6 1-8,console,file 211 trackobj 6 1-8,console,file 213 LinkTrap 6 1-8,console,file 214 CDP 6 1-8,console,file 215 LLDP 6 1-8,console,file 216 CiscoDP 6 1-8,console,file 222 Security 6 1-8,console,file 225 RMON 6 1-8,console,file 231 IPsec 6 1-8,console,file 1(emergencies) 2(alerts) 3(critical) 4(errors) 5(warnings) 6(notifications) 7(information) 8(debugging)
Enterasys S Serie SSA (SW-release mit VSB = Virtual Chassis Bonding):
Application Current Severity Level Server List ---------------------------------------------------------- 88 RtrAcl 6 1-8,console,file 89 CLI 6 1-8,console,file 90 SNMP 6 1-8,console,file 91 Webview 6 1-8,console,file 93 System 6 1-8,console,file 95 RtrFe 6 1-8,console,file 96 Trace 6 1-8,console,file 105 RtrLSNat 6 1-8,console,file 111 FlowLimt 6 1-8,console,file 112 UPN 6 1-8,console,file 117 AAA 6 1-8,console,file 118 Router 6 1-8,console,file 140 AddrNtfy 6 1-8,console,file 141 OSPF 6 1-8,console,file 142 VRRP 6 1-8,console,file 145 RtrArpProc 6 1-8,console,file 147 LACP 6 1-8,console,file 148 RtrNat 6 1-8,console,file 151 RtrTwcb 6 1-8,console,file 154 DbgIpPkt 6 1-8,console,file 158 HostDoS 6 1-8,console,file 180 RtrMcast 6 1-8,console,file 183 PIM 6 1-8,console,file 184 DVMRP 6 1-8,console,file 185 BGP 6 1-8,console,file 196 LinkFlap 6 1-8,console,file 199 Spoof 6 1-8,console,file 207 IPmcast 6 1-8,console,file 209 Spantree 6 1-8,console,file 211 trackobj 6 1-8,console,file 213 LinkTrap 6 1-8,console,file 214 CDP 6 1-8,console,file 215 LLDP 6 1-8,console,file 216 CiscoDP 6 1-8,console,file 218 OAM 6 1-8,console,file 222 Security 6 1-8,console,file 225 RMON 6 1-8,console,file 231 IPsec 6 1-8,console,file 239 Bonding 6 1-8,console,file 242 HAUpgrade 6 1-8,console,file 1(emergencies) 2(alerts) 3(critical) 4(errors) 5(warnings) 6(notifications) 7(information) 8(debugging)
Um jetzt mehr sehen zu können muss der Severity Level angepasst werden für die Application die man “debuggen” will. Ein meinem Fall war es SNMP auf einem B3 Switch also => SNMP.
set logging application SNMP level 7
Wer die Informationen an einen Syslog Server senden will sollte noch einen Syslogserver hinterlegen mit den richtigen Severity Level.
set logging server 1 ip-addr 10.1.1.1 severity 8 description "default" state enable
Alternativ kann man sich die Syslogs auch auf der Console ausgeben lassen:
A/B/C/D/I-Serie auf Console:
set logging local console enable
A/B/C/D/I/N/S-Serie in File:
set logging local console disable file enable
N/S-Serie:
set logging here enable
Im Syslog tauchte dann auch das System auf das versucht hat mit einer falschen SNMP Community auf die Switche zuzugreifen. Es war ein Printer Verwaltungserver (HP Jetadmin) der die komplette IP-Range des Standorts scannt und versucht per SNMP Parameter von den Geräten abzufragen (Tonerstand, etc.)
<166>Feb 1 10:33:06 192.168.1.52-1 TRAPMGR[175072816]: traputil.c(475) 260 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.2-1 TRAPMGR[138984840]: traputil.c(475) 430 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.4-1 TRAPMGR[138984160]: traputil.c(475) 245 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.8-1 TRAPMGR[138983208]: traputil.c(475) 264 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.11-1 TRAPMGR[138983560]: traputil.c(475) 327 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.14-2 TRAPMGR[138984192]: traputil.c(475) 203 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.15-1 TRAPMGR[138983728]: traputil.c(475) 219 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.35-1 TRAPMGR[175050544]: traputil.c(475) 205 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:05 192.168.1.39-1 TRAPMGR[126209216]: traputil.c(466) 181 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.43-1 TRAPMGR[175061168]: traputil.c(475) 280 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.48-1 TRAPMGR[175067568]: traputil.c(475) 446 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.52-1 TRAPMGR[175072816]: traputil.c(475) 261 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.2-1 TRAPMGR[138984840]: traputil.c(475) 431 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.4-1 TRAPMGR[138984160]: traputil.c(475) 246 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.8-1 TRAPMGR[138983208]: traputil.c(475) 265 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.11-1 TRAPMGR[138983560]: traputil.c(475) 328 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:07 192.168.1.15-1 TRAPMGR[138983728]: traputil.c(475) 220 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.14-2 TRAPMGR[138984192]: traputil.c(475) 204 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.35-1 TRAPMGR[175050544]: traputil.c(475) 206 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:06 192.168.1.39-1 TRAPMGR[126209216]: traputil.c(466) 182 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.43-1 TRAPMGR[175061168]: traputil.c(475) 281 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.48-1 TRAPMGR[175067568]: traputil.c(475) 447 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.52-1 TRAPMGR[175072816]: traputil.c(475) 262 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.2-1 TRAPMGR[138984840]: traputil.c(475) 432 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.4-1 TRAPMGR[138984160]: traputil.c(475) 247 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.8-1 TRAPMGR[138983208]: traputil.c(475) 266 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.11-1 TRAPMGR[138983560]: traputil.c(475) 329 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.14-2 TRAPMGR[138984192]: traputil.c(475) 205 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.15-1 TRAPMGR[138983728]: traputil.c(475) 221 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.35-1 TRAPMGR[175050544]: traputil.c(475) 207 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:08 192.168.1.39-1 TRAPMGR[126209216]: traputil.c(466) 183 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.43-1 TRAPMGR[175061168]: traputil.c(475) 282 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.48-1 TRAPMGR[175067568]: traputil.c(475) 448 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.52-1 TRAPMGR[175072816]: traputil.c(475) 263 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.2-1 TRAPMGR[138984840]: traputil.c(475) 433 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.4-1 TRAPMGR[138984160]: traputil.c(475) 248 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.8-1 TRAPMGR[138983208]: traputil.c(475) 267 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.11-1 TRAPMGR[138983560]: traputil.c(475) 330 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.14-2 TRAPMGR[138984192]: traputil.c(475) 206 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.15-1 TRAPMGR[138983728]: traputil.c(475) 222 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:10 192.168.1.35-1 TRAPMGR[175050544]: traputil.c(475) 208 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:09 192.168.1.39-1 TRAPMGR[126209216]: traputil.c(466) 184 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:11 192.168.1.43-1 TRAPMGR[175061168]: traputil.c(475) 283 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26 <166>Feb 1 10:33:11 192.168.1.48-1 TRAPMGR[175067568]: traputil.c(475) 449 %% Authent. Failure: Unit: 1 IP Address: 192.168.7.26
Installation des Radiusservers (NPS Rolle)
0- Öffnen Sie den Servermanager
-
Klicken Sie „Rollen hinzufügen“ an
-
Wählen Sie „Netzwerkrichtlinien- und Zugriffsdienste“ aus
-
Wählen Sie „Netzwerkrichtlinienserver“ aus und schließen Sie die Installation ab
Vorbereitungen im AD
-
Einrichten einer Sicherheitsgruppe für die berechtigten User
-
Im User muss der Haken „Kennwort mit umkehrbarer Verschlüsselung speichern“ ausgewählt sein
-
Nach dem setzen des Hakens muss das Passwort zurückgesetzt werden !!!
-
Den User der Sicherheitsgruppe hinzufügen
Einrichten des NPS
NPS
Radius Clients hinzufügen
WPA Enterprise mit EAP PEAP
0Für dieses Howto wird freeradius mit openssl Support benötigt.
Eine Anleitung für freeradius+openssl ist hier zu finden: Freeradius mit EAP Support
Die Pakete wie in der Anleitung beschrieben installieren.
Die unten aufgeführten Konfigurationsteile sind Ergänzungen oder Änderungen der Default Config.
openssl installieren
apt-get install openssl
RootCA anlegen
In das Verzeichnis /etc/freeradius/certs wechseln
cd /etc/freeradius/certs
openssl liefert ein einfaches Script um eine CA anzulegen.
/usr/lib/ssl/misc/CA.pl -newca
CA certificate filename (or enter to create)
Mit [Enter] bestätigen.
Making CA certificate ... Generating a 1024 bit RSA private key ...............................................++++++ ..........++++++ writing new private key to './demoCA/private/cakey.pem'
Ein Passwort definieren und eingeben.
Enter PEM pass phrase:
Verifying – Enter PEM pass phrase:
----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. -----
Country Name (2 letter code) [AU]:DE
State or Province Name (full name) [Some-State]:Bayern
Locality Name (eg, city) []:München
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Test
Organizational Unit Name (eg, section) []:Testabteilung
Common Name (eg, YOUR name) []:rootca
Email Address []:rootca@example.org
Please enter the following 'extra' attributes to be sent with your certificate request
2 mal mit [Enter] bestätigen.
A challenge password []:
An optional company name []:
Using configuration from /usr/lib/ssl/openssl.cnf
Enter pass phrase for ./demoCA/private/cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
b7:bc:7f:60:3c:98:84:b2
Validity
Not Before: Jul 31 07:33:47 2009 GMT
Not After : Jul 30 07:33:47 2012 GMT
Subject:
countryName = DE
stateOrProvinceName = Bayern
organizationName = Test
organizationalUnitName = Testabteilung
commonName = rootca
emailAddress = rootca@example.org
X509v3 extensions:
X509v3 Subject Key Identifier:
5C:85:A3:1C:70:8E:E3:60:62:C9:5A:60:83:A2:D5:3C:EA:64:C7:C9
X509v3 Authority Key Identifier:
keyid:5C:85:A3:1C:70:8E:E3:60:62:C9:5A:60:83:A2:D5:3C:EA:64:C7:C9
DirName:/C=DE/ST=Bayern/O=Test/OU=Testabteilung/CN=rootca/emailAddress=rootca@example.org
serial:B7:BC:7F:60:3C:98:84:B2
X509v3 Basic Constraints:
CA:TRUE
Certificate is to be certified until Jul 30 07:33:47 2012 GMT (1095 days)
Write out database with 1 new entries
Data Base Updated
Server Zertifikat erzeugen
openssl req -new -nodes -keyout server_key.pem -out server_req.pem -days 730 -config /etc/ssl/openssl.cnf
Generating a 1024 bit RSA private key ...++++++ ..............................................................................++++++ writing new private key to 'server_key.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. -----
Country Name (2 letter code) [AU]:DE
State or Province Name (full name) [Some-State]:Bayern
Locality Name (eg, city) []:München
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Test
Organizational Unit Name (eg, section) []:Testabteilung
Common Name (eg, YOUR name) []:server
Email Address []:server@example.org
Please enter the following 'extra' attributes to be sent with your certificate request
A challenge password []:
An optional company name []:
Server Zertifikat mit der rootCA signieren
openssl ca -config /etc/ssl/openssl.cnf -policy policy_anything -out server_cert.pem -infiles ./server_req.pem
Using configuration from /etc/ssl/openssl.cnf
Passwort der CA eingeben:
Enter pass phrase for ./demoCA/private/cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
b7:bc:7f:60:3c:98:84:b3
Validity
Not Before: Jul 31 08:10:11 2009 GMT
Not After : Jul 31 08:10:11 2010 GMT
Subject:
countryName = DE
stateOrProvinceName = Bayern
localityName = M\C3\BCnchen
organizationName = Test
organizationalUnitName = Testabteilung
commonName = server
emailAddress = server@example.org
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
D7:95:A8:C4:D7:70:BE:4C:D4:52:B1:E6:B5:A6:CD:37:B2:4A:6B:AE
X509v3 Authority Key Identifier:
keyid:5C:85:A3:1C:70:8E:E3:60:62:C9:5A:60:83:A2:D5:3C:EA:64:C7:C9
Certificate is to be certified until Jul 31 08:10:11 2010 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries Data Base Updated
Server Zertifikat zusammenbauen
cat server_key.pem server_cert.pem > server.pem
radiusd.conf
mschap {
authtype = MS-CHAP
use_mppe = yes
require_encryption = yes
require_strong = yes
clients.conf
In clients.conf muss für den Accesspoint ein „Shared Secret“ festgelegt werden. 192.168.0.10 ist die IP des Accesspoints.
client 192.168.0.10 {
# This is the shared secret between the Authenticator (the
# access point) and the Authentication Server (RADIUS).
secret = 123password456
shortname = accesspoint
}
users
Einen neuen User anlegen. Am Ende der users Datei einen neuen Benutzer hinzufügen. ACHTUNG in mehreren Howtos wird der Syntax User-Password == „password“ noch verwendet. Dieser Syntax ist für freeradius Version 2.x obsolet. Der neue Syntax lautet Cleartext-Password := „password“.
"mobil-user" Cleartext-Password := "password123"
eap.conf
eap {
default_eap_type = peap
tls {
CA_file = ${cadir}/demoCA/cacert.pem
}
}
sites-enabled/default
authorize {
mschap
# unix
}
authenticate {
Auth-Type MS-CHAP {
mschap
}
# unix
}
accounting {
# unix
}
freeradius testen
freeradius -X
Wenn alles ohne Fehler durchläuft sollte da folgendes erscheinen
Listening on authentication address * port 1812 Listening on accounting address * port 1813 Listening on proxy address * port 1814 Ready to process requests.
Daemon starten
[Strg-C] /etc/init.d/freeradius start
Accesspoint einstellen -Allgemein-
-
Radiusserver + Radiusport + Shared Secret eingeben
-
Modus: WPA2-Enterprise
Client anbinden -Allgemein-
-
CAcert.pem zu den vertrauten Zertifizierungsstellen hinzufügen
-
Mode WPA2-Enterprise
-
EAP PEAP auswählen







