OpenVPN client and Homeassistant on Ubuntu = problem for me

Hi all
I have a very well working setup of HA on Ubuntu 18.04 .
Now I installed OpenVPN client to be able to use my powerful NUC also as a torrentbox with openvpn+qbittorrent. Its working, qbittorrent is only using VPN network interface (tun0) and Chrome is using VPN through tun0 with no problem. Everything is autostarting correctly when NUC is restarted.

Problem is when OpenVPN client is activated (autostart and always on is my wish) , HA seems to have trouble co-existing with VPN setup. The following components seems to be at fault:

  • duckdns/letsencrypt (i cant access from outside or domain)
  • sonos/media player discovery problem. No connection to media players/sonos on local network
  • xiaomi integration not able to use/start (no major problem, i can get rid of it and use only deconz)
  • I think that some location tracking also fails, especially google map tracking

I have ethernet network interface to the NUC (enu0) with same IP as before, that way i can access HA on local net by local IP-adress, but not through internet (duckdns).

I was digging into forums how to force HA and related processes to use non-VPN interface for both incoming, outgoing and discovery/integrations, but I could not understand how to do that (“ip netds” method???) and I was thinking I may be going the wrong way :slight_smile:

Any ideas of how to force HA and related processes to only use non-VPN network interface is very welcome :smile:

For any interested in OpenVPN (torrents etc)+ Homeassistant (no VPN) on same machine.

Not possible to solve as I see it in same installation/OS.
I solved it by using windows 10, with openvpn-client and then running Homeassistant from Ubuntu installed in a Virtualbox inside windows.

That way Virtualbox can access the non vpn network interface directly and communicate (network bridge mode) out on non-vpn ethernet interface. Ubuntu dont know about the vpn and all windows traffic is vpn:ed.
“Bridge mode” in virtualbox makes it seem there are 2 separate machines, 2 separate ip-adresses on local net.
Works well :slight_smile: