<div dir="ltr"><div><div><div><div>I am running bind 9.8.2 on a pair of RHEL 6 DNS servers.. One server is the master, one is the slave. My goal is to setup 2 views so that our internal folks can resolve hostnames to internal IP's while still allowing our external customers to resolve from the outside. Both of these servers are external facing and have only one public IP each. First of all I would like to know if what I am trying to achieve is even possible with my current setup. What we have are internal users that are trying to access internal resources via a domain name that only exist in our external DNS. We do not have an internal zone for this domain or a inside DNS server that we can point them to in order to get a result for the query. So that leaves us looking at views for the solution. <br><br>To be more precise, this is what is happening now. <br><br></div>Internal client > looks up host that's actually on the internal network but resolves to an external IP. The problem with this is 2 fold. <br><br></div>1) DNS returns an external IP<br></div>2) Since the resource is internal, the traffic flow to the outside and back in happens on the same outside interface, which results in a hairpin, which we do not allow.<br><br></div><div>Now, what I was told is that a DNS view type solution would not be applicable to the hairpin. My understanding is that internal clients query the server already to get results for external IP, so if we had a zone file in a view that had internal mappings, this would work and the internal user could access the resource since they are now being pointed to an internal IP. <br><br></div><div>So what I want to do is setup an "internal" view for the zone in question that points to a db file with the internal IP of that host, and an external view for everyone else. <br></div><div><br></div><div>My questions is:<br><br></div><div>1) Would DNS views work for my use case now that my server layout has been described?<br><br></div><div>If so I need help in setting up TSIG because in my test lab everything seems to work except that on my slave server my zone in 
"view A" is being updated with the data from the master server from 
"view B". And view B seems to be in sync on both servers, although it seems when I update zone files I have to restart instead of a reload to get the zones to update. Even then, that does not always work. There is a link I found online that says TSIG would be the solution for this but it gives very little details on what the config is doing, so I do not know how to make TSIG work in my environment. This is the link I found:<br><br><a href="https://kb.isc.org/article/AA-00295/0/How-do-I-share-a-dynamic-zone-between-multiple-views-.html">https://kb.isc.org/article/AA-00295/0/How-do-I-share-a-dynamic-zone-between-multiple-views-.html</a><br><br></div><div>Here are the relavent parts to my config as it stands now from the master. <br><br>acl internal {<br></div><div>1.2.3.4; // public IP coming from the inside users<br></div><div>};<br><br>acl external {<br></div><div>5.6.7.8; // everyone else<br></div><div>9.10.11.12;; // everyone else<br></div><div>};<br><br>view "insideview" {<br>      match-clients { internal; };<br><br>      zone"<a href="http://example.com">example.com</a>" IN {<br>      type master;<br>      file "/var/named/<a href="http://db.exampleinside.com">db.exampleinside.com</a>"; // this db file will be shown to the clients in the internal ACL and map back to internal IP's<br>};<br>};<br>          <br>view "extview" {<br>      match-clients { external; };<br><br>zone"<a href="http://example.com">example.com</a>" IN {<br>      type master;<br>      file "/var/named/<a href="http://db.exampleoutside.com">db.exampleoutside.com</a>";<br>};<br><br></div>The conf from the slave is identical to the above. Can anyone help me by showing me what a TSIG config would look like for my environemnt?<br><div><br><br><br><br><br><br><br><br><br></div><div><br></div><div><br></div><br></div>