DNS problems in CoreELEC with connman when using OpenVPN

Hello everyone,

I’ve recently bought an Odroid N2 for a new HTPC build runnign CoreELEC. Everything was super easy to setup and i got the basics running. However, i’ve run into an issue setting up my VPN using OpenVPN (tried Zomboided VPN Manager, but i’d rather run it in the OS as a service)

It seems that when i don’t supply the Odroid with a DNS server using DHCP from my router, it uses 8.8.8.8 and 8.8.4.4. With my VPN running, this works but i’d rather use my VPN providers internal VPN server (10.8.0.1). For some reason, every time i try to add another DNS, there seems to be a route automatically added to my routing table, pointing outside of my VPN towards my router.

As can be seen in the journalctl:

Mar 29 22:08:32 htpc openvpn[4360]: Initialization Sequence Completed
Mar 29 22:09:04 htpc connmand[3749]: eth0 {add} route 10.8.0.1 gw 10.0.47.1 scope 0

And my routing table:

0.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
0.0.0.0 10.0.47.1 0.0.0.0 UG 0 0 0 eth0
10.0.47.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.47.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
10.8.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tun0
10.8.0.1 10.0.47.1 255.255.255.255 UGH 0 0 0 eth0 <<< want this removed
128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
123.123.123.1 10.0.47.1 255.255.255.255 UGH 0 0 0 eth0

How do i prevent this from happening?

Regard,

EekNL

I’ve gotten a little bit further. The faulty route that was giving me headaches was actually caused by a change i made myself trying to troubleshoot my DNS issues.

i added 10.8.0.1 as a nameserver under
storage/.cache/connman/ethernet_0f1e2d3c4b5a_cable/ , which is the eth0 interface with 10.0.47.1 as gateway. After removing this entry, the route is now gone.

This gives me another problem, for some reason, the system uses 8.8.8.8 and 8.8.4.4 as nameserver. I don’t push any DNS from my router using DHCP and in my journalctl i can see the OpenVPN server pushes 10.8.0.1:

openvpn[3975]: PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 10.8.0.1,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::

but:

cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

I suspect this is the cause:
FallbackNameservers = 8.8.8.8,8.8.4.4
in /etc/connman/main.conf

But this file is read-only. What would be the best way to approach this?

Regards,

EekNL