WLAN
Jump to navigation
Jump to search
WLAN
This wiki page describes how to prepare and connect a wireless adapter for host use in Proxmox VE. Example connects to a WPA/WPA2 network
Setup
find adapter name:
$ ip addr
bring interface down:
# ifdown $WLAN_NIC
backup configuration:
# cp /etc/network/interfaces /etc/network/interfaces.bak
restrict permissions:
# chmod 0600 /etc/network/interfaces
calculate WPA PSK hash for wireless-network:
$ wpa_passphrase $NETWORK_name $SECRET_password
- output:
network={ ssid="$NETWORK_name" #psk="$SECRET_password" psk=$HASHED_password }
- if no password included: you will be prompted '# reading passprhase from stdin' where you enter it there
- use \ if $NETWORK_name has spaces
- E.g: "My Home Network" would be "My\ Home\ Network" for $NETWORK_name
copy $HASHED_password and choose a method:
method 1
/etc/network/interfaces
- best for desktops with WLAN modules?
add to /etc/network/interfaces:
... auto wlp3s0 iface wlp3s0 inet dhcp wpa-ssid $NETWORK_name wpa-psk $HASHED_password ...
method 2
/etc/wpa_supplicant/wpa_supplicant.conf
- best for roaming laptops?
create file /etc/wpa_supplicant/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ ## home settings ssid=$NETWORK_name key_mgmt=WPA-PSK psk=$HASHED_password } network={ ssid="MyFriendsWirelessLAN" key_mgmt=NONE wep_key0="HerPasswd" wep_tx_idx=0 } network={ ssid="OpenHotSpotProvider" key_mgmt=NONE } network={ scan_ssid=1 key_mgmt=NONE } network={ ssid="eduroam" scan_ssid=1 key_mgmt=IEEE8021X eap=TTLS anonymous_identity="anonymous@your.school" identity="yourID@your.school" password="yourPassword" phase2="auth=PAP" ca_cert="/path/to/certificates/eduroam.der" priority=2 }
references
- local: /usr/share/doc/wpa_supplicant/examples/
- web: https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf
cleaning up
manually assign IP on router
- consult your DHCP server
change root adapter IP address:
# ifconfig $WLAN_NIC $IP_ADDRESS netmask $NETMASK
if required, change Default Gateway:
# route add default gw $IP_GATEWAY $WLAN_NIC
check settings on routing table:
$ route -n
bring network adapter up:
$ ifup $WLAN_NIC
check $IP_ADDRESS:
$ ip addr
test:
$ ping -c 3 $SOME_HOST
restarting network
if a connection hasn't been made consider the following commands:
# /etc/init.d/networking restart #wpa_action $WLAN_NIC reload
# /etc/init.d/network-manager restart
- full reboot consistently works