I have a UDOO Neo board that connects to the internet via WIFI (wlan0) with an OpenVPN client configured.
I have an OpenVPN server running on AWS.
Both are working fine if I start OpenVPN after I have established a working wlan0 connection.
The problem is that when the board boots, it seems that the openvpn client and the wlan0 connection are conflicting, resulting in the fact that my wlan0 connection keeps on connecting and disconnectig, constantly, untill I shut down the OpenVPN Client.
I've added some more information here :
http://askubuntu.com/questions/711035/openvpn-and-wlan0-wont-play-nice
My network config looks like this :
# Loopback network interface
auto lo
iface lo inet loopback
# Primary network interface
#auto eth0
#iface eth0 inet dhcp
allow-hotplug usb0
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.252
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
dns-nameservers 8.8.8.8
### Add a line like this for every Wifi network defined in the wpa_supplicant.conf file
iface home inet dhcp
iface work inet dhcp
iface iphone inet dhcp
My OpenVPN client config looks like this
cat /etc/openvpn/client.conf
client
dev tun
proto udp
remote <server ip>
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/udooneo1.crt
key /etc/openvpn/easy-rsa/keys/udooneo1.key
If I start the openvpn client after having a WIFI connection with wlan0 all processes are running fine, and the board connects to the OpenVPN server just fine and the wlan0 connection remains stable
root 25612 1 0 01:46 ? 00:00:01 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -W -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root 25795 1 0 01:46 ? 00:00:01 /sbin/wpa_cli -B -P /var/run/wpa_action.wlan0.pid -i wlan0 -p /var/run/wpa_supplicant -a /sbin/wpa_action
root 26146 1 0 01:49 ? 00:00:07 /usr/sbin/openvpn --writepid /run/openvpn/client.pid --daemon ovpn-client --status /run/openvpn/client.status 10 --cd /etc/openvpn --config
When I'm booting the board the OpenVPN service starts automatically and what I'm seeing then is that my WIFI is constantly connecting / disconnecting. It's as if the openvpn client is interfering somehow.
root 4124 4123 0 11:02 ? 00:00:00 /bin/sh /sbin/wpa_action wlan0 CONNECTED
root 4979 4977 0 11:03 ? 00:00:00 /bin/sh /sbin/wpa_action wlan0 DISCONNECTED
I read somewhere that when the openvpn tun0 interface is started, all roaming interfaces are shutdown, so this might be an explanation but I have no idea on how to resolve it.
This only happens when I'm using wpa-roam in met /etc/network/interfaces. If I use wpa-conf I don't have this issue. The issue with wpa-conf however is that it doesn't automatically reconnect to my WIFI when the WIFI connection drops (this usually happens after some 12 hours of uptime).
Any idea on how to handle this ?