ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Mikhail Efremov <sem@altlinux.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] resolvconf
Date: Fri, 27 Feb 2015 02:32:07 +0300
Message-ID: <20150227023207.3378dacc@sem-notebook> (raw)
In-Reply-To: <54EF7CFB.2020002@altlinux.ru>

On Thu, 26 Feb 2015 23:07:23 +0300 Anton Gorlov wrote:
> All - а как наш resolvconf правильно готовить?
> 
> 
> echo -n "nameserver 10.10.0.15" | /sbin/resolvconf  -a tun0
> 
> cat /etc/resolv.conf
> # Generated by resolvconf
> # Do not edit manually, use
> # /etc/net/ifaces/<interface>/resolv.conf instead.
> nameserver 127.0.0.1
> 
> 
> 127.0.0.01 -  это /etc/net/ifaces/ppp1/resolv.conf  поднимаемый при
> старте
> 
> tun0 это openvpn  который поднимается в ручную при необходимости и вот
> пытался через vpn менять DNS
> 
> на момент вызывания resolvconf (руками) tun0 уже существует и живой
> 
> 
> ip a l tun0
> 15: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc
> fq_codel state UNKNOWN qlen 100
>     link/none
>     inet 10.0.10.37 peer 10.0.10.2/32 scope global tun0
>        valid_lft forever preferred_lft forever
> 
> 
> настраивать openvpn через etcnet не предлагать

Я не понял в чем, собственно, проблема. Пишется скрипт, который
будет вызываться при установке соединения (см. --up/--up-delay в
openvpn(8)). В нем вызываете resolvconf с нужными ns (возможно
приехавшими от сервера). В down скрипте удаляете с помощью resolvonf -d.
Если нужно через DNS-сервер за туннелем резолвить только определенный
домен, то удобно использовать private_interfaces (см.
resolvconf.conf(5)). Это будет работать только при наличии локального
DNS-сервера, но у вас он очевидно есть, раз в resolv.conf ns 127.0.0.1.

-- 
WBR, Mikhail Efremov


  reply	other threads:[~2015-02-26 23:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 20:07 Anton Gorlov
2015-02-26 23:32 ` Mikhail Efremov [this message]
2015-02-27  8:31   ` Anton Gorlov
2015-02-27 10:32     ` Mikhail Efremov
2015-02-27 11:57       ` Anton Gorlov
2015-02-27 12:11         ` Mikhail Efremov
2015-02-27 12:44           ` Anton Gorlov
2015-02-27 15:29             ` Mikhail Efremov
2015-02-27 20:33               ` Anton Gorlov
2015-02-28 13:09                 ` Anton Gorlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150227023207.3378dacc@sem-notebook \
    --to=sem@altlinux.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git