公司网络接入需要802.1X认证,今天想把一台测试服务器接入公司网络,故需要配置认证
配置/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root
ap_scan=0
network={
key_mgmt=IEEE8021X
eap=PEAP
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
identity="USERNAME"
password="PASSWORD"
}
脚本启动认证和dhcp - startnet.sh(这个脚本需要开机启动)
#!/bin/bash
ifconfig eth0 up
ifconfig eth0 promisc
wpa_supplicant -i eth0 -B -Dwired -c /etc/wpa_supplicant/wpa_supplicant.conf
sleep 1
dhcpd eth0