it:linux:wpa-eap

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
it:linux:wpa-eap [2012/08/15 09:05] berniit:linux:wpa-eap [2020/12/22 15:31] – [wpa_supplicant] admin
Zeile 13: Zeile 13:
  
 ===== Freeradius Konfiguration ===== ===== Freeradius Konfiguration =====
-Will ein Client (in unserem Beispiel ein AP) eine Verbindung zum Radiusserver aufbauen, benötigt man einen entsprechenden Eintrag in der Datei "/etc/freeradius/client.conf".+==== /etc/freeradius/clients.conf ==== 
 + 
 +Will ein Client (in unserem Beispiel ein AP) eine Verbindung zum Radiusserver aufbauen, benötigt man einen entsprechenden Eintrag in der Datei "/etc/freeradius/clients.conf".
 <code bash> <code bash>
 ... ...
Zeile 23: Zeile 25:
 ... ...
 </code> </code>
 +
 +==== /etc/freeradius/eap.conf ====
 +
  
 Des Weiteren ist EAP zu konfigurieren. Des Weiteren ist EAP zu konfigurieren.
Zeile 65: Zeile 70:
  }  }
 </code> </code>
 +
 +==== /etc/freeradius/sites-available/myconfig ====
 +<code bash>
 +authorize {
 + preprocess
 +  if("%{NAS-Identifier}" == "homenet") {
 +    update control {
 +      EAP-TLS-Require-Client-Cert = Yes
 +    }
 +    eap
 +  }
 +
 +  if("%{NAS-Identifier}" == "guestnet") {
 +    files
 +    eap
 +  }
 +}
 +
 +authenticate {
 + eap
 +}
 +
 +preacct {
 + preprocess
 + acct_unique
 + suffix
 + files
 +}
 +
 +accounting {
 + detail
 + unix
 + radutmp
 + exec
 + attr_filter.accounting_response
 +}
 +
 +session {
 + radutmp
 +}
 +
 +post-auth {
 + exec
 + Post-Auth-Type REJECT {
 + attr_filter.access_reject
 + }
 +}
 +
 +pre-proxy {
 +}
 +
 +post-proxy {
 + eap
 +}
 +</code>
 +
 +Das hier ist die zentrale Konfig des Radiusservers.
 +Es wird zwischen zwei NAS-Identifier unterschieden: "guestnet" und "homenet".
 +Beim Anmelden im "homenet" wird ein Client-Zertifikat verlangt.
 +
 +Config aktivieren:
 +<code bash>
 +cd /etc/freeradius
 +rm sites-enabled/default
 +ln -s sites-available/myconfig sites-enabled
 +</code>
 +
  
 ===== PKI ===== ===== PKI =====
Zeile 99: Zeile 171:
 </code> </code>
  
-==== Dateien für Radiusserver ====+==== Dateien für den Radiusserver ====
   * ca.crt: Das Certificate-Authority Zertifikat   * ca.crt: Das Certificate-Authority Zertifikat
   * freeradius.key: Der Private Schlüssel des Radiusservers   * freeradius.key: Der Private Schlüssel des Radiusservers
Zeile 105: Zeile 177:
   * dh1024.pem: [[http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange|Diffie-Hellman-Parameter]]   * dh1024.pem: [[http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange|Diffie-Hellman-Parameter]]
  
 +Diese Dateien werden unter "/etc/freeradius/certs" abgelegt.
 +
 +==== Dateien für den Client ====
 +  * ca.crt: Das Certificate-Authority Zertifikat
 +  * client01.key: Der Private Schlüssel des Clients
 +  * client01.crt: Das Zertifikat des Clients
 +
 +Im Falle einer PKCS12 Datei, muss nur diese verteilt werden.
 +
 +===== Accesspoints =====
 +Nach dem Installieren von OpenWRT muss noch das Paket "wpad" installiert werden:
 +
 +<code bash>
 +opkg update
 +opkg remove wpad-mini
 +opkg install wpad
 +</code>
 +
 +==== /etc/config/network ====
 +<code bash>
 +
 +config 'interface' 'loopback'
 +        option 'ifname' 'lo'
 +        option 'proto' 'static'
 +        option 'ipaddr' '127.0.0.1'
 +        option 'netmask' '255.0.0.0'
 +
 +config 'switch'
 +        option 'name' 'rtl8366rb'
 +        option 'reset' '1'
 +        option 'enable_vlan' '1'
 +
 +#VLAN ID 4 shall be the guestnet
 +#VLAN is tagged for CPU (@5) and WAN Port (@0)
 +config 'switch_vlan'
 +        option 'device' 'rtl8366rb'
 +        option 'vlan' '4'
 +        option 'ports' '0t 5t'
 +
 +#VLAN ID 5 shall be the homenet
 +#VLAN is tagged for CPU (@5) and WAN Port (@0)
 +config 'switch_vlan'
 +        option 'device' 'rtl8366rb'
 +        option 'vlan' '5'
 +        option 'ports' '0t 5t'
 +        
 +#IP config for homenet
 +config 'interface' 'home_net'
 +        option 'proto' 'static'
 +        option 'ifname' 'eth0.5'
 +        option 'netmask' '255.255.255.0'
 +        option 'type' 'bridge'
 +        option 'gateway' '10.0.3.250'
 +        option 'dns' '10.0.3.1'
 +        option 'ipaddr' '10.0.3.250'
 +
 +#IP config for guestnet
 +config 'interface' 'guest_net'
 +        option 'type' 'bridge'
 +        option 'proto' 'static'
 +        option 'ifname' 'eth0.4'
 +        option 'netmask' '255.255.255.0'
 +        option 'ipaddr' '10.0.2.250'
 +</code>
 +
 +==== /etc/config/wireless ====
 +<code bash>
 +...
 +
 +config 'wifi-iface'
 +        option 'device' 'radio0'
 +        option 'mode' 'ap'
 +        option 'ssid' 'gastnetz'
 +        option 'network' 'guest_net'
 +        option 'encryption' 'wpa2'
 +        option 'auth_secret' 'changeme'
 +        option 'auth_server' '10.0.3.1'
 +        option 'acct_server' '10.0.3.1'
 +        option 'acct_secret' 'changeme'
 +        option 'nasid' 'guestnet'
 +
 +config 'wifi-iface'
 +        option 'device' 'radio0'
 +        option 'mode' 'ap'
 +        option 'ssid' 'heimnetz'
 +        option 'network' 'home_net'
 +        option 'encryption' 'wpa2'
 +        option 'auth_secret' 'changeme'
 +        option 'auth_server' '10.0.3.1'
 +        option 'acct_server' '10.0.3.1'
 +        option 'acct_secret' 'changeme'
 +        option 'nasid' 'homenet'
 +</code>
 +
 +**HINWEISE:**   
 +  * Der Radiusserver ist unter der IP 10.0.3.1 zu erreichen.
 +  * Der gemeinsame Schlüssel zwischen Radiusserver und Client ist "changeme"
 +  * Der NAS-Identifier für das "gastnetz" ist "guestnet" und für das "heimnetz" ist er "homenet"
 +
 +==== wpa_supplicant ====
 +
 +=== /etc/network/interfaces ===
 +<code bash>
 +...
 +auto wlan0
 +allow-hotplug wlan0
 +iface wlan0 inet dhcp
 +  wpa-driver wext
 +  wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 +</code>
 +=== EAP-TLS ===
 +
 +<code bash>
 +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +update_config=1
 +country=DE
 +fast_reauth=1
 +p2p_disabled=1
 +
 +network={
 +  ssid="<SSID>"
 +  eap=TLS
 +  key_mgmt=WPA-EAP
 +  pairwise=CCMP TKIP
 +  proto=RSN
 +  group=CCMP TKIP
 +  identity="<DEVICE_IDENTITY>"
 +  ca_cert="/etc/cert/ca.crt"
 +  client_cert="/etc/cert/device.crt"
 +  private_key="/etc/cert/device.key"
 +  private_key_passwd="<PRIVATE KEY>"
 +
 +}
 +
 +</code>
 +
 +
 +====== Links ======
 +  * [[http://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#EAP_extensions_under_WPA_and_WPA2_Enterprise]]
 +  * [[http://en.wikipedia.org/wiki/Extensible_Authentication_Protocol]]
 +  * [[http://en.wikipedia.org/wiki/Extensible_Authentication_Protocol#PEAP]]
 +  * [[http://www.tp-link.com/en/products/details/?model=TL-WR1043ND]]
 +  * [[http://en.wikipedia.org/wiki/Virtual_LAN]]
 +  * [[http://freeradius.org/]]
  
  
  
  
  • it/linux/wpa-eap.txt
  • Zuletzt geändert: 2020/12/22 15:31
  • von admin