8021x on wired Ethernet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

8021x on wired Ethernet

Bengt Ahlgren-2
Is there a standard "rc.conf" way to configure 8021x authentication on
wired ethernet?

Invoking wpa_supplicant manually with -Dwired -iem0 works.

(Or should I ask on net@?)

Bengt
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 8021x on wired Ethernet

Aleksander Matveev
On 15/05/2018 20:00, Bengt Ahlgren wrote:
> Is there a standard "rc.conf" way to configure 8021x authentication on
> wired ethernet?
>
> Invoking wpa_supplicant manually with -Dwired -iem0 works.
>
> (Or should I ask on net@?)

I use this configuration with slightly modified /etc/rc.d/wpa_supplicant
script:
$ grep em0 /etc/rc.conf:
ifconfig_em0="WPA DHCP"

# cat /etc/wpa_supplicant.conf.em0
ap_scan=0
network={
         key_mgmt=IEEE8021X
         eap=PEAP
         identity="a.matveev"
         anonymous_identity="a.matveev"
         password="PASSW0RD"
         phase1="peaplabel=0"
         phase2="auth=MSCHAPV2"
         ca_cert="/etc/ssl/our_cert.cer"
}

$ diff -u /usr/src/etc/rc.d/wpa_supplicant /etc/rc.d/wpa_supplicant
--- /usr/src/etc/rc.d/wpa_supplicant    2017-12-03 03:11:58.273579000 +0300
+++ /etc/rc.d/wpa_supplicant    2018-05-16 17:36:48.971154000 +0300
@@ -38,7 +38,11 @@
  load_rc_config $name

  command=${wpa_supplicant_program}
-conf_file=${wpa_supplicant_conf_file}
+if [ -f ${wpa_supplicant_conf_file}"."$ifn ] ; then
+       conf_file=${wpa_supplicant_conf_file}"."$ifn
+else
+       conf_file=${wpa_supplicant_conf_file}
+fi
  pidfile="/var/run/${name}/${ifn}.pid"
  command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile"
  required_files=$conf_file

--
Aleksandr Matveev
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"