Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Setting a fixed nameserver for openvpn
Date: Mon, 06 Mar 2023 10:44:13
Message-Id: dfd5cb0e-548c-191f-c436-f64e9dd329f4@gmail.com
In Reply to: Re: [gentoo-user] Setting a fixed nameserver for openvpn by Wols Lists
1 Wols Lists wrote:
2 > On 06/03/2023 08:08, Neil Bothwick wrote:
3 >> On Mon, 6 Mar 2023 07:54:51 +0000, Wols Lists wrote:
4 >>
5 >>> There's another file - can't remember its name - that tells your
6 >>> resolver what to try in what order - the hosts file, dns, what dhcp
7 >>> told you, etc etc, so your resolver might not be using dns the way you
8 >>> think.
9 >>
10 >> Do you mean /etc/nsswitch.conf?
11 >>
12 >>
13 > Ah yes. Any idea why Firefox seems to ignore it? Whenever I try to
14 > browse to local machines in /etc/hosts, firefox gives me a google
15 > search page which is a bloody nuisance. If I type a VALID ADDRESS in
16 > the ADDRESS BAR, that's where I expect to go! Not some damn random
17 > search page!
18 >
19 > Cheers,
20 > Wol
21 >
22 >
23
24
25 I found where someone posted about Firefox, it seems you can change that
26 in preferences.  You just uncheck a box.  Anyway.
27
28 I looked at the nsswitch file.  I'm not 100% sure what it says but it
29 looks like others I've found.  Basically, it points to /etc and that's
30 it, for network stuff anyway.  So, I dug around some more.  I found a
31 command that shows what it is seeing and should be using.  This is the info:
32
33
34 root@fireball / # resolvconf -l
35 # resolv.conf from tun0
36 # Generated by openvpn for interface tun0
37 nameserver 162.252.172.57
38 nameserver 149.154.159.92
39
40 # resolv.conf from tun0.inet
41 nameserver 162.252.172.57
42 nameserver 149.154.159.92
43
44 # resolv.conf from enp3s0
45 # Generated by netifrc for interface enp3s0
46 nameserver 8.8.8.8
47 nameserver 8.8.4.4
48
49 # resolv.conf from enp3s0.dhcp
50 # Generated by dhcpcd from enp3s0.dhcp
51 nameserver 10.0.0.1
52
53 root@fireball / #
54
55
56 I left the IPs Surfshark gave me in this one.  As you can see tho, for
57 my VPN it should be using the ones I'm telling it to use, manually. 
58 Thing is, it isn't.  This is a link to the website Surfshark sent me and
59 the info it says it is using for DNS lookup. 
60
61 https://surfshark.com/check
62
63 DNS addresses:
64 107.179.20.190 / United States of America, Los Angeles / LayerHost
65
66 As one can tell, I don't have the IP for DNS listed anywhere up there. 
67 So, it seems one part is seeing the changes I want to make but the rest
68 is just plain ignoring me.  Do I need to do something for those to take
69 effect or do they just work?  I restarted both the VPN and my regular
70 network.  What am I missing here? 
71
72 Thanks.
73
74 Dale
75
76 :-)  :-)