Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2018 17:39:50 +0300
From:      Aleksander Matveev <timon@timon.net.nz>
To:        freebsd-questions@freebsd.org
Subject:   Re: 8021x on wired Ethernet
Message-ID:  <f2fe0f70-41c7-0cfd-8e2a-3a71ac538541@timon.net.nz>
In-Reply-To: <uh7603o7t1k.fsf@P142s.sics.se>
References:  <uh7603o7t1k.fsf@P142s.sics.se>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f2fe0f70-41c7-0cfd-8e2a-3a71ac538541>