[CentOS] nameserver issue

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[CentOS] nameserver issue

fred smith
Hi all!

This question is, at best, somewhat peripheral to Centos, but I'm
hoping to be forgiven, and that someone here can give me a clue.

I've just brought up a nameserver on my household LAN, bind9 on a
Raspberry Pi.

The connection with Centos is this: my main desktop is C7, and its
hardwired network is also manual, not dhcp. I've edited the ipv4 config
(in NM) and changed the DNS settings from 192.168.2.1 (the router) to
192.168.2.2 (the RPi). I've also manually tweaked /etc/resolv.conf
to contain 192.168.2.2 instead of 192.168.2.1.

works fine. until I fire up a vpn. having done that, looking in
/etc/resolv.conf (while the vpn is connected) it has reverted to
192.168.2.1.

after shutting down the vpn, 192.168.2.1 remains in resolv.conf

what am I overlooking here?

now the not-so-Centos-related question:
I've changed the dhcp settings in my router so it should deliver
192.168.2.2 to the dhcp clients instead of 192.168.2.1. And it does,
sorta. all the systems that use DHCP, now are configured with two
DNS server addresses, 192.168.2.2, and 192.168.2.1. And I have no
clue why 192.168.2.1 is still showing. Both windows and Linux systems
are showing this behavior.

Clues appreciated!

and thanks in advance.
--
---- Fred Smith -- [hidden email] -----------------------------
               But God demonstrates his own love for us in this:
                         While we were still sinners,
                              Christ died for us.
------------------------------- Romans 5:8 (niv) ------------------------------
_______________________________________________
CentOS mailing list
[hidden email]
https://lists.centos.org/mailman/listinfo/centos
Reply | Threaded
Open this post in threaded view
|

Re: [CentOS] nameserver issue

Kenneth Porter
--On Thursday, April 20, 2017 12:34 AM -0400 Fred Smith
<[hidden email]> wrote:

> works fine. until I fire up a vpn. having done that, looking in
> /etc/resolv.conf (while the vpn is connected) it has reverted to
> 192.168.2.1.
>
> after shutting down the vpn, 192.168.2.1 remains in resolv.conf

Which VPN? It's not uncommon for VPN software to change the resolver
setting to point to your VPN peer's DNS, so that all traffic goes through
the VPN, including your DNS traffic.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
CentOS mailing list
[hidden email]
https://lists.centos.org/mailman/listinfo/centos
Reply | Threaded
Open this post in threaded view
|

Re: [CentOS] nameserver issue

fred smith
On Thu, Apr 20, 2017 at 12:32:41AM -0700, Kenneth Porter wrote:

> --On Thursday, April 20, 2017 12:34 AM -0400 Fred Smith
> <[hidden email]> wrote:
>
> >works fine. until I fire up a vpn. having done that, looking in
> >/etc/resolv.conf (while the vpn is connected) it has reverted to
> >192.168.2.1.
> >
> >after shutting down the vpn, 192.168.2.1 remains in resolv.conf
>
> Which VPN? It's not uncommon for VPN software to change the resolver
> setting to point to your VPN peer's DNS, so that all traffic goes
> through the VPN, including your DNS traffic.

I use OpenConnect VPN for this pareticular task.

and yes I know the vpn changes it, then should put it back when one
disconnects.

problem is, where is it getting the old address from? It isn't in
the resolv.conf before the vpn is started, and it is not in the NM
setups, anywhere, and it isn't in any of the files in /etc/sysconfig/network*,
so where is it coming from? And that particular system is NOT using
DHCP. Beats me!

Fred

--
---- Fred Smith -- [hidden email] -----------------------------
                         God made him who had no sin
                      to be sin for us, so that in him
                 we might become the righteousness of God."
--------------------------- Corinthians 5:21 ---------------------------------
_______________________________________________
CentOS mailing list
[hidden email]
https://lists.centos.org/mailman/listinfo/centos
Reply | Threaded
Open this post in threaded view
|

Re: [CentOS] nameserver issue

Kenneth Porter
--On Thursday, April 20, 2017 9:10 AM -0400 Fred Smith
<[hidden email]> wrote:

> problem is, where is it getting the old address from? It isn't in
> the resolv.conf before the vpn is started, and it is not in the NM
> setups, anywhere, and it isn't in any of the files in
> /etc/sysconfig/network*, so where is it coming from? And that particular
> system is NOT using DHCP. Beats me!

Good question. Could systemd be involved? I found this bug:

<https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1624317>



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
CentOS mailing list
[hidden email]
https://lists.centos.org/mailman/listinfo/centos
Reply | Threaded
Open this post in threaded view
|

Re: [CentOS] nameserver issue

fred smith
On Fri, Apr 21, 2017 at 08:34:29AM -0700, Kenneth Porter wrote:

> --On Thursday, April 20, 2017 9:10 AM -0400 Fred Smith
> <[hidden email]> wrote:
>
> >problem is, where is it getting the old address from? It isn't in
> >the resolv.conf before the vpn is started, and it is not in the NM
> >setups, anywhere, and it isn't in any of the files in
> >/etc/sysconfig/network*, so where is it coming from? And that particular
> >system is NOT using DHCP. Beats me!
>
> Good question. Could systemd be involved? I found this bug:
>
> <https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1624317>

I'll take a look at that, thanks.

I also have more info...

My router is stupid. apparently it sends to the dhcp clients the
nameserver address you enter into the dhcp configs, but it appends
its own LAN address to it so the clients get both:

https://www.snbforums.com/threads/dns-problems-with-dhcp.23132/#post-319233
that is a discussion of a similar router from the same mfg as mine, and
it behaves the same way.

You can see this directly if you have a windows system, run "ipconfig /renew"
then "ipconfig /all" and you'll see both addresses listed as DNS.

Now, does that have anything to do with my Centos box which is
manually configured? I can't see how, but it makes me wonder.


--
---- Fred Smith -- [hidden email] -----------------------------
   "For the word of God is living and active. Sharper than any double-edged
   sword, it penetrates even to dividing soul and spirit, joints and marrow;
              it judges the thoughts and attitudes of the heart."  
---------------------------- Hebrews 4:12 (niv) ------------------------------
_______________________________________________
CentOS mailing list
[hidden email]
https://lists.centos.org/mailman/listinfo/centos