# how the heck do I get openresolv doing something?

## grimm26

I stumbled upon openresolv and it sounds great since I'm always having to manually edit my /etc/resolv.conf after connecting to my work VPN so that I can still resolve local name properly.  After emerging openresolv and looking at the website, I'm at a loss. http://roy.marples.name/projects/openresolv/wiki/OpenResolvConfig is pretty useless.  "/etc/resolvconf.conf is the openresolv's configuration file. The out of the box default just talks to libc. If you have a resolver other than libc installed, you will need to configure three varibles."  And those three variables would be.... ?  There is an example config listed below that with 8 variables set and it still isn't clear to me how it is supposed to work.

What am I missing?

----------

## UberLord

Firstly, I take offense at the pretty useless part as it clearly shows how to configure openresolv to talk to 5 different local resolvers.

Secondly, links are then provided for each resolver listed with instructions on how to in turn configure the resolver for openresolv.

Thirdly, the part you are probably missing is the VPN client you are using actually using resolvconf to setup DNS. You didn't say which one you use, so we don't know if it supports resolvconf or not.

----------

## cach0rr0

awkwarddddd

video related

----------

## cach0rr0

 *UberLord wrote:*   

> 
> 
> links are then provided for each resolver listed with instructions on how to in turn configure the resolver for openresolv.
> 
> 

 

i think i get the bit of confusion, I read through it, it's the mention of "three variables", followed by the example below that might confuse someone who doesn't realize which of those options/includes are required regardless of your resolver, which are default, which apply across the board, etc. Maybe a brief comment saying something like "only needed if you use $fooresolver"? Some folks may not know if they're supposed to include some, all, or none of the below config snippet (though the latter should be obvious for libc). The mind hears "three variables", and thinks "I should check this page for three of something somewhere".

...then again I suppose that's what forums and the like are for; rather than documenting everything under the sun plus one's navel, expansion of is covered in detail elsewhere as a reactive interactive process. 

man, it's late, i sound like Jesse Jackson. I think this is my last post of the night.

----------

## grimm26

 *UberLord wrote:*   

> Firstly, I take offense at the pretty useless part as it clearly shows how to configure openresolv to talk to 5 different local resolvers.
> 
> Secondly, links are then provided for each resolver listed with instructions on how to in turn configure the resolver for openresolv.
> 
> Thirdly, the part you are probably missing is the VPN client you are using actually using resolvconf to setup DNS. You didn't say which one you use, so we don't know if it supports resolvconf or not.

 

I didn't mean to offend.  The wiki tells me reasons to use openresolv, how to download openresolv, how to install openresolv, and how to configure openresolv.  Emerging takes care of the download and install.  It says that using with just libc resolver works out of the box.  And....  There's a step missing because I don't know how the files installed by the openreolv ebuild do anything.  Am I supposed to run something?  Is there a hook that is supposed to be setup somewhere?  I'll gladly admit that it is assumed that I know something that I clearly do not.  A HOWTO would help.

Also, I use Juniper Network Connect for my VPN.  I'm also running dnscache but only to help get around the awkwardness of the VPN tunnel.  My assumption is that openresolv will allow me to specify to lookup certain domains on the DNS servers provided through the VPN and everything else through the DNS server on my LAN.  Maybe my assumption is wrong.

----------

## UberLord

 *Quote:*   

> The wiki tells me reasons to use openresolv, how to download openresolv, how to install openresolv, and how to configure openresolv.  Emerging takes care of the download and install.  It says that using with just libc resolver works out of the box.  And....  There's a step missing because I don't know how the files installed by the openreolv ebuild do anything.  Am I supposed to run something?  Is there a hook that is supposed to be setup somewhere?  I'll gladly admit that it is assumed that I know something that I clearly do not.  A HOWTO would help.

 

libc resolver won't do what you need it to. You'll need one of the others.

As to the missing step, it's how resolvconf is called. We have a man page the that, resolvconf(8 ).

 *Quote:*   

> Also, I use Juniper Network Connect for my VPN.  I'm also running dnscache but only to help get around the awkwardness of the VPN tunnel.  My assumption is that openresolv will allow me to specify to lookup certain domains on the DNS servers provided through the VPN and everything else through the DNS server on my LAN.  Maybe my assumption is wrong.

 

I can't see any mention of resolvconf support for your VPN client. IF there is a script that's run when it connects / disconnects then we can add support to it

See resolvconf(8 ) for details.

And if you use a DHCP client in Gentoo, the chances are that they support resolvconf and you can look to see how they do it. If you need anymore help, just ask here.

----------

## grimm26

Well, I control the juniper client with a script instead of launching it from the browser but the magic all happens in the juniper java app.  In my script I set an at job after the java is launched that runs a script to mangle the /etc/resolv.conf in a minute after the tunnel is hopefully made  :Smile: .   The extra magic involved there is that I have set dnscache to hit my company's DNS servers for its domain(s) and my local DNS server for everything else.

You'll be happy to know that I use dhcpcd as my dhcp client  :Smile: .

----------

## UberLord

If you look at /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf then you can see how dhcpcd works with resolvconf

Essentially it's like this

Create resolv.conf in a temporary location

cat resolv.conf | resolvconf -a $interface

To remove it

resolvconf -d $interface

----------

