OpenVPN, resolvconf, and DNS domain resolution
Clash Royale CLAN TAG#URR8PPP
While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.
Example:
Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 172.16.1.101
nameserver 172.16.1.102
search site1.internal.domainOpen OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and
/etc/openvpn/update-resolv-conf
pushes them to resolvconf.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.5
nameserver 172.16.1.101
nameserver 172.16.1.102
search site2.internal.domain site1.internal.domainDNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain
Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?
I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.
dns openvpn resolvconf resolv.conf
add a comment |
While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.
Example:
Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 172.16.1.101
nameserver 172.16.1.102
search site1.internal.domainOpen OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and
/etc/openvpn/update-resolv-conf
pushes them to resolvconf.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.5
nameserver 172.16.1.101
nameserver 172.16.1.102
search site2.internal.domain site1.internal.domainDNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain
Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?
I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.
dns openvpn resolvconf resolv.conf
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
1
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19
add a comment |
While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.
Example:
Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 172.16.1.101
nameserver 172.16.1.102
search site1.internal.domainOpen OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and
/etc/openvpn/update-resolv-conf
pushes them to resolvconf.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.5
nameserver 172.16.1.101
nameserver 172.16.1.102
search site2.internal.domain site1.internal.domainDNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain
Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?
I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.
dns openvpn resolvconf resolv.conf
While at site1, I need to connect to site2 via OpenVPN. Once connected, the OpenVPN site2 pushes a DNS nameserver and domain search options. This causes all name resolutions for site1 to fail.
Example:
Physically connected at site1, DHCP pushes DNS options and resolvconf manages them.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 172.16.1.101
nameserver 172.16.1.102
search site1.internal.domainOpen OpenVPN tunnel to site2, OpenVPN pushes dhcp-option DNS and DOMAIN for site2 and
/etc/openvpn/update-resolv-conf
pushes them to resolvconf.
/etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.5
nameserver 172.16.1.101
nameserver 172.16.1.102
search site2.internal.domain site1.internal.domainDNS resolution works for server.site2.internal.domain but fails for server.site1.internal.domain
Is there a way that any failed DNS request to site21 should fall-through to the site1 DNS servers? Or configure resolvconf that only queries for site2.internal.domain should be passed to the site2 nameserver?
I use an Ubuntu 14.04 machine at site1, and the OpenVPN server at site2 is a pfSense 2.2 box. I manage both sites so making changes to either side isn't a problem. Both domains are non-public and internal use only.
dns openvpn resolvconf resolv.conf
dns openvpn resolvconf resolv.conf
asked Jun 15 '15 at 10:06
Tim JonesTim Jones
63115
63115
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
1
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19
add a comment |
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
1
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
1
1
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19
add a comment |
1 Answer
1
active
oldest
votes
resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f209760%2fopenvpn-resolvconf-and-dns-domain-resolution%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings
add a comment |
resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings
add a comment |
resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings
resolv.conf list all availables DNS servers. As long as the first one in the list is up and running, all queries will be send to it. Nothing to the others unless the first one is down. So, if the first DNS server in list is up and know the answer, he reply "I know it !", else he'll say "I'm afraid I don't know...". And that's all.
You have to make 192.168.1.5 (the DNS server of site2) aware of all entries of site1, and vice-versa of course.
Greetings
answered Feb 22 '18 at 12:30
user4089user4089
914
914
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f209760%2fopenvpn-resolvconf-and-dns-domain-resolution%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I should add that although the laptop is Ubuntu 14.04, I don't use NetworkManager.
– Tim Jones
Jun 15 '15 at 10:10
1
i am interested to see if there is a flexible way to redirect DNS quesries to different servers, for example by checking the FQDN.. :)
– nass
Jun 15 '15 at 12:19