2

Our customer has a domain. Let's call it example.com.

We are running a VM in the network of our customer. Let's call it "our-vm".

The customer is accessing the vm with this name: our-vm.example.com.

The IP address is an internal for example 10.1.2.3

The name server of our customer (example.com) does not resolve the host name.

We have a VPN to our customer and are able to access 10.1.2.3 via IP address.

But I would like to access the host by name.

What I want:

  • our-vm.example.com should get resolved by me (running a bind in our network)
  • www.example.com, mail.example.com and other names should get resolved by example.com

How to configure bind this way?

Sub-question: is there a name for this type of configuration?

This is not a duplicate of (Overriding some DNS entries in BIND for internal networks) because I want example.com to be handled by the customer.

1
  • 3
    And the term you're looking for is "DNS masquerade"
    – Jenny D
    Jan 22, 2019 at 8:57

1 Answer 1

5

In your BIND configuration, include something like this:

zone "example.com" {
  type forward;
  forwarders { x.x.x.x; y.y.y.y; };
};

zone "our-vm.example.com" {
  type master;
  file "/var/named/db/our-vm.example.com";
};

That should do the trick.

Edit: Apparently the correct term is, according to Jenny D, "DNS masquerade".

Not the answer you're looking for? Browse other questions tagged .