ubuntu22.04連網/peap/WPA2/MSCHAPv2
阿新 • 來源:網路 • 發佈:2022-05-14
問題:
最近新電腦裝的ubuntu22.04連線校園網發現連不上了,查閱文件發現問題出在ubuntu22上,ubuntu用的是非安全認證,所以很多校園網包括eduroam都崩了,所以要手動enable
這裡不論需不需要ca證書應該都能解決這部分問題,解決不了的小夥伴記得看看自己的CA證書名字是不是帶空格,帶空格記得刪掉
解決方法參考這篇文章
https://askubuntu.com/questions/279762/how-to-connect-to-wpa2-peap-mschapv2-enterprise-wifi-networks-that-dont-use-a-c
第一步:
Create specific openssl.cnf for wpa_supplicant
$ sudo cp /etc/ssl/openssl.cnf /etc/wpa_supplicant/
This will ensure that enabling TLS 1.0 applies only to WPA negotiations, which will mitigate the security impact of this change somewhat.
第二步:
Enable legacy TLS in the copied config file
$ sudo gedit /etc/wpa_supplicant/openssl.cnf
找到下面幾行
[openssl_init]
providers = provider_sect```
在後面插入
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
Options = UnsafeLegacyRenegotiation
CipherString = [email protected]=1
第三步:
Make wpa_supplicant use the new configuration
As root, edit /usr/lib/systemd/system/wpa_supplicant.service.
$ sudo gedit /usr/lib/systemd/system/wpa_supplicant.service
找到下面幾行
[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
ExecReload=/bin/kill -HUP $MAINPID```
改成
[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
Environment="OPENSSL_CONF=/etc/wpa_supplicant/openssl.cnf"
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
ExecReload=/bin/kill -HUP $MAINPID
第四步:
Restart the wpa_supplicant
$ sudo systemctl daemon-reload
$ sudo systemctl restart wpa_supplicant.service
然後就能解決問題了
