# looking for 802.1x client on freebsd



## cwthfly (Aug 30, 2010)

hello, is there a tool acting as 802.1x client on freebsd? (like xsupplicant..)


----------



## gordon@ (Aug 30, 2010)

Check out wpa_supplicant(8). It has support for 802.1x. The conf page has some more about it as well: wpa_supplicant.conf(5).


----------



## cwthfly (Aug 30, 2010)

gordon@ said:
			
		

> Check out wpa_supplicant(8). It has support for 802.1x. The conf page has some more about it as well: wpa_supplicant.conf(5).



does wpa_supplicant also work for wired case? (I thought it only works for wireless...)


----------



## cwthfly (Aug 30, 2010)

cwthfly said:
			
		

> does wpa_supplicant also work for wired case? (I thought it only works for wireless...)



I found the answer, wpa_supplicant support the wired case now!!


----------



## cwthfly (Aug 30, 2010)

seems wpa_supplicant for wired only supported on ubuntu. 
netbsd and freebsd both gave the error info:
"Unsupported driver 'wired'."

(the version: wpa_supplicant v0.5.8)


----------



## richardpl (Aug 30, 2010)

What FreeBSD version? On 8.0 and higher it must work without problems via wpa_supplicant from FreeBSD, dunno about one from ports...

There are at least two mailing list thread about this subject posted long ago ....


----------



## cwthfly (Aug 31, 2010)

it is version7.1

I have download and installed a new version0.6.10 of wpa_supplicant to /usr/local/sbin, while the original version 0.5.8 in installed under /usr/sbin by default.
and when i use whereis wpa_supplicant, it still shows that wpa_supplicant is under /usr/sbin, and the version of wpa_supplicant is still 0.5.8
how to fix it??


----------



## richardpl (Aug 31, 2010)

wpa_supplicant version is irrelevant here (it just need to be not ultra old one without wired support...), more important is how wpa_supplicant is built. If you just run wpa_supplicant without any arguments you will notice that it will also show available drivers. In my case they are: *ndis*, *wired* and *bsd*.

When using 3rd party wpa_supplicant you put whole path: /usr/local/bin/wpa_supplicant. You could also replace old wpa_supplicant with new one...


----------



## cwthfly (Aug 31, 2010)

now I can run the new wpa_supplicant, thanks for your help!!

but the eapol pkt sent out seems not correct, the packet body length is always 0. my conf file:


```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=0

network={
        ssid="1x-test"
        scan_ssid=1
        key_mgmt=IEEE8021X
        eap=MD5
        phase2="auth=PAP password=1234"
        identity="haha"
        anonymous_identity="haha"
        password="1234"
        eapol_flags=0
}
```

is there anything wrong with the conf above?


----------

