Results 1 to 3 of 3

Thread: "Routing" DNS queries to different servers?

Hybrid View

  1. #1
    Join Date
    Nov 2013
    Beans
    4

    "Routing" DNS queries to different servers?

    Hi there,

    I have setup my VPN client with proper routing so that my default route remains the internet, and only the addresses in my company internal network are routed through the VPN.
    This is working correctly, but however, I didn't find a way to do the same with DNS queries.
    I would like to have a default DNS server, but all queries to *.mycompany.com and *.mycompanycorp.com and a few other domains should be directed to the DNS server provided by the VPN.

    Is there a way to do that? It's probably possible using bind but I'm not familiar with it. (I didn't find a way to do it with dnsmasq, dnscache or resolvconf.)

    Thanks

  2. #2
    Join Date
    Nov 2013
    Beans
    4

    Re: "Routing" DNS queries to different servers?

    Actually, I think I can find a way to do that using the --server option of dnsmasq. I just have to find a way to do that automatically with network-manager

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: "Routing" DNS queries to different servers?

    If you are running a BIND server, you can use forwarders for specific domains. In named.conf you would have entries like

    Code:
    zone "mycompany.com" {
         type forward;
         forward only;
         forwarders { ip.addr.of.dnsserver };
    };
    Then queries sent to this server will be resolved against the server at "ip.addr.of.dnsserver".
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •