title: Ubuntu 18, VPN and DNS: curl wont resolve VPN-host, but nslookup and dig can
body: <p>i found that apparently in Ubuntu 18 the whole DNS-setup is very confusing. Im connected through an pritunl VPN to my kube-cluster and im trying to use the kube-dns server. So i first tried to use <a href="https://github.com/jonathanio/update-systemd-resolved" rel="nofollow noreferrer">https://github.com/jonathanio/update-systemd-resolved</a> to update my DNS settings with the pushed DNS server from the VPN, but it seems that currently something is broken (<a href="https://github.com/jonathanio/update-systemd-resolved/issues/64" rel="nofollow noreferrer">https://github.com/jonathanio/update-systemd-resolved/issues/64</a>).
  As im ok with hard-coding the DNS ip somewhere, i tried putting the IP in some places: installing resolvconf and putting it in <code>/etc/resolvconf/resolv.conf.d/head</code>, putting it in <code>/etc/systemd/resolved.conf</code>, of course also trying to put it directly into <code>/etc/resolv.conf</code>, as im a naiv person. After restarting some things a couple of times, i reached an even more confusing state:</p>
  
  <pre><code>% dig pritunl-ui.infra.svc.cluster.local                      
  [...]
  ;; ANSWER SECTION:
  pritunl-ui.infra.svc.cluster.local. 30 IN A 10.15.246.61
  [...]
  </code></pre>
  
  <p>So this looks good, but:</p>
  
  <pre><code>% curl 'https://pritunl-ui.infra.svc.cluster.local' --insecure
  curl: (6) Could not resolve host: pritunl-ui.infra.svc.cluster.local
  </code></pre>
  
  <p>Calling the IP does work though:</p>
  
  <pre><code>% curl 'https://10.15.246.61' --insecure
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt;
  &lt;title&gt;Redirecting...&lt;/title&gt;
  &lt;h1&gt;Redirecting...&lt;/h1&gt;
  &lt;p&gt;You should be redirected automatically to target URL: &lt;a href="https://10.15.246.61/login"&gt;https://10.15.246.61/login&lt;/a&gt;.  If not click the link.
  </code></pre>
  
  <p>I also tried turning-it-off-and-on-again (my host machine), but stays the same. <code>nslookup</code> does also work fine, <code>tracepath</code> doesnt.</p>
  
  <pre><code>% systemd-resolve --status
  Global
           DNS Servers: 10.15.240.10
            DNS Domain: svc.cluster.local
            DNSSEC NTA: 10.in-addr.arpa
                        16.172.in-addr.arpa
                        168.192.in-addr.arpa
                        17.172.in-addr.arpa
                        18.172.in-addr.arpa
                        19.172.in-addr.arpa
                        20.172.in-addr.arpa
                        21.172.in-addr.arpa
                        22.172.in-addr.arpa
                        23.172.in-addr.arpa
                        24.172.in-addr.arpa
                        25.172.in-addr.arpa
                        26.172.in-addr.arpa
                        27.172.in-addr.arpa
                        28.172.in-addr.arpa
                        29.172.in-addr.arpa
                        30.172.in-addr.arpa
                        31.172.in-addr.arpa
                        corp
                        d.f.ip6.arpa
                        home
                        internal
                        intranet
                        lan
                        local
                        private
                        test
  
  Link 3 (tun0)
        Current Scopes: DNS
         LLMNR setting: yes
  MulticastDNS setting: no
        DNSSEC setting: no
      DNSSEC supported: no
           DNS Servers: 10.15.240.10
            DNS Domain: default.svc.cluster.local
                        ~.
  
  Link 2 (wlp2s0)
        Current Scopes: DNS
         LLMNR setting: yes
  MulticastDNS setting: no
        DNSSEC setting: no
      DNSSEC supported: no
           DNS Servers: 192.168.178.1
                        fd00::cece:1eff:feba:6468
            DNS Domain: ~.
                        fritz.box
  </code></pre>
  
  <p>Any ideas how to make this work?</p>