You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFE] prevent DNS lookup on interface ("negative routing domains") #21260
Only specific domains should be resolved via the VPN’s DNS servers, and everything that is not related to the company’s domain names should go to regular, non-VPN DNS instead.
My problem is that VPN is not always up. When the VPN is down (and its interface is removed), the DNS queries that should have, and could only be, resolved when the VPN is up, are sent to public DNS instead, "leaking" the private company server names.
Describe the solution you'd like
I would like to have a way to "negate" a routing domain, something like ~. !~mycompany.com
that would mean, send everything to this interface except queries for this specific domain.
Describe alternatives you've considered
Right now I can live with my laptop sending DNS queries for mycompany.com on public internet...
I think there are solutions based on starting another DNS proxy like unbound or dnsmasq, but they seem overly complex for my problem.
Another possibility could be to play with some rules that would be triggered when the VPN is unplugged, and would add entries dynamically into /etc/hosts, and remove them when the VPN is plugged again...
Another possibility is to have a dummy "sinkhole" interface, with DNS domain set as ~mycompany.com, and DNS server set as 127.0.0.2. Resolutions of names belonging to mycompany.com will be sent to the sinkhole. When I am connected into the company's network, this interface must be shut down (using some rule or script)
The systemd version you checked that didn't have the feature you are asking for
per doc I don't think any systemd version has this feature.
Activity
[-][RFE] prevent DNS lookup on interface[/-][+][RFE] prevent DNS lookup on interface ("negative routing domains")[/+]resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add new "DNS Delegate" concepts (#34368)