Saturday 21 April 2018

wireless networking - OpenVPN causes WLAN/WiFi to disconnect in Linux?

If I configure my Wireless network on start up (wpa_supplicant & dhclient), the connection is fine until I launch OpenVPN.


At which point the wireless interface disassociates (not until the tunnel is established) and I have to bring it back up manually by either restarting networking or doing ifdown/ifup. Which does work but is a real pain.


dmesg reports:


ADDRCONF(NETDEV_CHANGE) wlan0: link becomes ready
wlan0: disassociating from 00:00:00:00:00:00 by local choice (reason=3)
cfg80211: Calling CRDA to update world regulatory domain
ADDRCONF(NETDEV_CHANGE) wlan0: link is not ready

OpenVPN doesn't throw any error messages apart from not being able to reach the server once the WiFi goes down.


I have tried creating both tun/tap devices without OpenVPN and this is perfectly fine, they can be assigned IP addresses.


wpa_supplicant and wpa_cli is still running once the interface goes down, so I have to run


ifdown --force wlan0


I have stripped my OpenVPN config to the minimal sample config and the same problem is still occuring.


I have also tried it with both rt2800 and rtl8187 devices, both experience the same behavior.


My config files are as follows, but I haven't had a problem with them until trying to get OpenVPN to work.


Interfaces File


#/etc/network/interfaces
auto wlan0
iface inet wlan0 manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wpa-driver wext

iface inet default dhcp

wpa_supplicant


ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=netdev
update_config=1
eapol_version=1
ap_scan=1
fast_reauth=1

network={
ssid="myap"
scan_ssid=1
key_mgmt=WPA-EAP
eap=TTLS
ca_cert="/etc/ssl/certs/certificate.pem"
identity="me"
password="mypassword"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
priority=1
}

EDIT:


After debugging for a little while I have determined it is something to do with the wpa-roam option, changing this to wpa-conf solves the problem (wpa_cli is not launched). I will update again when I have narrowed it down to the specific signal causing the issue.


EDIT2:


I have updated wpa_supplicant from 1.0 to 2.0 and the same problem still occurs, the WiFi is simply disassociating from the AP when an openvpn tunnel forms, the wireless interface is not actually taken down (pre,down,post are not called when this happens)

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...