LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-11-2017, 07:34 PM   #1
LQSlacker
Member
 
Registered: Jul 2016
Posts: 94

Rep: Reputation: Disabled
dhcpcd not updating resolv.conf when using resolvconf


I'm running 14.2 x64 with only Openbox, and I'm only using dhcpcd, and I've installed openresolv to use resovlconf with update-resolv-conf for OpenVPN.

When I connect to an OpenVPN server I see that resolv.conf is updated with the VPNs DNS, but when I disconnect resolv.conf is empty and doesn't get updated back with dhcpcd.

I've read some things regarding this, that it doesn't just happen automatically like when using a network client that takes care of this and does the updating for you.

So I want to figure out how I can stay away from using the NetworkManager or wicd and just use only dhcpcd and have resolv.conf updated, when I disconnect from the VPN?

Right now when I disconnect resolv.conf is empty;

# Generated by resolvconf

Thanks
 
Old 10-12-2017, 08:12 PM   #2
LQSlacker
Member
 
Registered: Jul 2016
Posts: 94

Original Poster
Rep: Reputation: Disabled
What over 300 views and no one knows anything about this?
 
Old 10-12-2017, 08:39 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
I know that I don't. I've never used any of Openbox, openresolv, or OpenVPN.

I know a little bit about dhcpcd, but I have absolutely no idea how you are using it in your environment.

If you give a little more detail, someone may be able to help.
 
Old 10-12-2017, 08:53 PM   #4
LQSlacker
Member
 
Registered: Jul 2016
Posts: 94

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
I know that I don't. I've never used any of Openbox, openresolv, or OpenVPN.

I know a little bit about dhcpcd, but I have absolutely no idea how you are using it in your environment.

If you give a little more detail, someone may be able to help.
Actually I did explain it, I use resovlconf with update-resolv-conf for OpenVPN, not sure what else to explain.

Maybe once openresolv/resovlconf is installed the only way to control this is with resovlconf.

For now in the resolvconf.conf I added in;

name_servers=

Which is keeping my nameserver, when I'm not using the VPN nameserver.

I just thought instead of this method, that when I'm disconnected from the VPN dhcpcd can be made to udpate resolv.conf, which it does do on its own...

It just seems that once you've installed resolvconf, then this is used and dhcpcd is by passed;

/lib/dhcpcd/dhcpcd-hooks/20-resolv.conf

Last edited by LQSlacker; 10-12-2017 at 08:55 PM.
 
Old 10-12-2017, 09:01 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If you have never used any of that, the statement...

Quote:
I use resovlconf with update-resolv-conf for OpenVPN
...is pretty meaningless. The words I've put in bold could be replaced by the word "barf" and the statement would have as much meaning to me.

I'm willing to help but I'm not willing to dig into the details of OpenVPN to do so. Dunno about the other couple of hundred people.
 
Old 10-12-2017, 09:11 PM   #6
LQSlacker
Member
 
Registered: Jul 2016
Posts: 94

Original Poster
Rep: Reputation: Disabled
This is the SBo for openresolv; (management framework for resolv.conf)

http://slackbuilds.org/repository/14...rch=openresolv

When using the update-resolv-conf for OpenVPN it pushes the DNS from the VPN server to the client, so that you are only using the DNS over the VPN tunnel...

When you make a connection to the OpenVPN server, resolvconf updates resolv.conf with the DNS from the VPN server, when you disconnect from the VPN, resolv.conf will now be empty. I thought dhcpcd would then update resolv.conf but it appears from this /path /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf the hook for dhcpcd is now to do all this through resolvconf.

So for now, maybe I have accomplished this by placing in resolvconf.conf;

name_servers=

Because now that nameserver stays listed in resolv.conf, along with the new updated one from the VPN, and when I disconnect from the VPN my nameserver still stays in resolv.conf

I just had to make sure that now with both my ISP nameserver and the VPN nameserver, I wasn't getting them both queried online, because the point here is to only use the VPN nameserver, and when I tested this online, I was getting that result.

So now I have either figured out the correct way of doing this with resolvconf, or placed a band-aid on it, this I am trying to still figure out, the correct approach to this.

Hope I've made this clear now...

Last edited by LQSlacker; 10-12-2017 at 09:13 PM.
 
Old 10-13-2017, 12:47 AM   #7
LQSlacker
Member
 
Registered: Jul 2016
Posts: 94

Original Poster
Rep: Reputation: Disabled
I uninstalled openresolv then made sure any leftovers were removed, cleaned it all out and reinstalled it and it's working...

Not sure why it wasn't working before, but now when I disconnect from the VPN, dhcpcd restores resolv.conf back to it's original...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ho to disable 'other' interfaces from updating resolv.conf vrs Linux - Software 2 06-17-2015 06:03 AM
[SOLVED] Resolvconf.conf is only half working slack_ Arch 4 06-29-2014 02:38 PM
I don't want dhcpcd to edit/replace /etc/resolv.conf simopal6 Linux - Networking 2 11-09-2009 02:13 PM
resolv.conf ifup dhcpcd not working together andrewguy9 Linux - Wireless Networking 1 03-19-2005 02:43 PM
How to prevent MDK 10 from updating /etc/resolv.conf on every boot Ph0enix2003 Mandriva 0 06-18-2004 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration