BIND9响应取决于服务器网卡

时间:2016-12-05 20:41:56

标签: networking dns debian bind9

我在私有网络上的debian 8上运行了3个虚拟机。我们将它们命名为A,B和C.

=> C是具有2个网卡的虚拟机(我们将它们命名为a和b),每个网卡具有不同的IP地址。 C服务器上安装了BIND9。

=>服务器的DNS设置在网卡的IP上

=> B服务器将其DNS设置在b网卡的IP上

我如何根据所询问的网卡调整DNS服务器响应,最好的方法是什么? 先感谢您 !

编辑:

# named.example01.conf

acl trusted { 192.168.7.0/24; localhost; };
acl guest   { 192.168.8.0/24; };

view trusted {
   match-clients { trusted; };

   allow-recursion { any; };

   zone "myzone.example" {
     type master;
     file "db.myzone.example";
   };
   zone "7.168.192.in-addr.arpa" {
     type master;
     file "db.192.168.7";
   };
};

view guest {
   match-clients { guest; };

   allow-recursion { any; };
};

1 个答案:

答案 0 :(得分:2)

protected void Search_Click(object sender, EventArgs e) { try { if (Name.Text == "") { strSQl = "select * from employees"; da = new OleDbDataAdapter(strSQl, con); ds = new DataSet(); da.Fill(ds, "employees"); } else { strSQl = "select * from employees where name ='" + this.ToTitleCase(Name.Text) + "' or surname='" + this.ToTitleCase(Name.Text) + "'"; da = new OleDbDataAdapter(strSQl, con); ds = new DataSet(); da.Fill(ds, "employees"); Label2.Text = "Employees found"; } } catch (Exception ex) { Label2.Text = "error"; } CrystalReport report = new CrystalReport(); report.SetDataSource(ds.Tables["employees"]); CrystalReportViewer1.ReportSource = report; } view声明一起使用。