[Swan] Updating resolv.conf on connection basis

Paul Wouters paul at nohats.ca
Sun Aug 17 02:49:38 EEST 2014


On Sun, 10 Aug 2014, Francis GASCHET wrote:

> I'd like to update the resolv.conf on my Debian 7 when a given connection 
> goes up, and only this one. I use 3.9 with Klips.
> Currently I added the variables PLUTO_PEER_DNS_INFOand PLUTO_PEER_DOMAIN_INFO 
> in /etc/default/pluto_updown. It works fine if I activate only the connection 
> "A" over which I can contact the DNS server. But if I open another connection 
> (say "B") instead of "A", which doesn't knows this DNS server, I don't want 
> the resolv.conf to be updated.

Your best bet is to use leftupdown=/your/custom/updown which you can
base of /usr/libexec/ipsec/_updown.klips. That way, you can do something
custom in only the connection that has the leftupdown= set.

Paul


More information about the Swan mailing list