Differences
This shows you the differences between two versions of the page.
systemd-resolved_vs_vpn_and_local_dns_overrides [02.01.2019 20:33] – created Pascal Suter | systemd-resolved_vs_vpn_and_local_dns_overrides [02.01.2019 20:57] (current) – removed Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== systemd-resolved vs VPN and local DNS overrides ====== | ||
- | i have some services (such as this wiki) which are hosted on a server in my home network. The server is behind a NAT router which means that in order to access for example my wiki from home i will need to contact the local IP rather than the public IP of my router with the NAT rule for port 80 and 443. | ||
- | To make this transparent to the user (and more importantly, | ||
- | |||
- | Luckily **systemd-resolved** has a solution for that: we can specify a specific dns to be preferably used for a given domain, which is exactly what we want here. | ||
- | |||
- | create a new file (and possibly also the path) at ''/ | ||
- | < | ||
- | [Resolve] | ||
- | DNS=192.168.8.254 | ||
- | Domains=~psuter.ch | ||
- | </ | ||
- | where '' | ||
- | |||
- | now restart (reload is not possible for this service) the systemd-resolved service: | ||
- | systemctl restart systemd-resolved.service | ||
- | |||
- | if you try now the preference is in place and dns queries for my local sites will be resolved by ma local DNS even if i'm using vpn's to other networks. |