ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Alexei V. Mezin" <alexei.mezin@gmail.com>
To: sisyphus@lists.altlinux.org
Subject: [sisyphus] etcnet, VPN и DNSы для конкретных доменов
Date: Wed, 17 Nov 2021 02:41:44 +0300
Message-ID: <sn1fjp$kf7$1@ciao.gmane.io> (raw)

Есть пользовательский компьютер, сеть через etcnet, настроен интерфейс с 
OpenVPN, при выполнении

# ifup vpn_interface

все поднимается, соединяется. Но ожидаемо, что имеющиеся в системе ДНСы, 
которые пришли через DHCP от провайдера, ничего не знают о хостах в той 
сети, куда открывается VPN. Хочется, чтоб адреса *.corp.domain.com 
ресолвились через ДНС этой самой corp.

Говорят, что просто так это в линуксе не работает (не то что в виндовз 
или мак). Есть какой-то обходной собственный путь у NM. И есть свой путь 
у systemd-resolved.

Документация на /etc/systemd/resolved.conf особой внятностью в этом 
вопросе не отличается. У меня не получилось заставить ее работать с ДНС 
"по умолчанию" на все адреса, и с конкретным ДНС на конкретный домен.

Зато для OpenVPN есть скрипт
https://github.com/jonathanio/update-systemd-resolved

который при поднятии интерфейса через DBUS добавляет ДНС/домен, а при 
отключении убирает. И это неплохо работает:

$ systemd-resolve --status
Global
          Protocols: +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   resolv.conf mode: foreign
Current DNS Server: 192.168.0.254
        DNS Servers: 192.168.0.254
         DNS Domain: local.lan

...
Link 13 (vpn)
     Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
          Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS 
DNSSEC=no/unsupported
Current DNS Server: 10.17.203.250
        DNS Servers: 10.17.203.250
         DNS Domain: ~corp.domain.com


Один сервер 192.168.0.254 по DHCP для всех доменов, а для 
*.corp.domain.com персонально 10.17.203.250


И все бы было хорошо, если бы в etcnet для VPN не навертели 
принудительного вызова собственного скрипта, который перекрывает вызов 
скриптов из файла настроек. И в результате ничего не работает.

Может кому-то удалось решить такую проблему? Принимаются ли 
FeatureRequest'ы на etcnet через багзиллу?







             reply	other threads:[~2021-11-16 23:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 23:41 Alexei V. Mezin [this message]
2021-11-18  9:09 ` Sergey
2021-11-18  9:18   ` Alexei Mezin
2021-11-18 12:10     ` Sergey
2021-11-18 12:24       ` Alexei Mezin
2021-11-18 12:33         ` Sergey
2021-11-18 12:48           ` Alexei Mezin
2021-11-18 13:21             ` Sergey
2021-11-18 12:40         ` Mikhail Efremov
2021-11-18 21:56           ` Alexei V. Mezin

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='sn1fjp$kf7$1@ciao.gmane.io' \
    --to=alexei.mezin@gmail.com \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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