Adding Hosts to ACL

To add a new host to the ACL of your name server, use the add_to_acl operation. You can add multiple hosts to ACL using a single packet. This operation is available on Linux only.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet adding a new host to the ACL includes the add_to_acl operation node:

<packet version="1.4.2.0">
<dns>
   <add_to_acl>
   ...
   </add_to_acl>
</dns>
</packet>

 

The graphical representation of the add_to_acl node is as follows:

You can add multiple hosts to the ACL in a single packet using filters. Add as many host parameters to the filter node as the number of hosts you want to add to the ACL.

 
Response Packet Structure

The add_to_acl node of the output XML packet is structured as follows:

 

 
Samples
Adding a single host to ACL

This request packet adds host 192.168.34.56 to the ACL.

<packet>
<dns>
 <add_to_acl>
  <filter>
   <host>192.168.34.56</host>
  </filter>
 </add_to_acl>
</dns>
</packet>

Response:

<packet>
<dns>
 <add_to_acl>
  <result>
   <status>ok</status>
   <host>192.168.34.56</host>
  </result>
 </add_to_acl>
</dns>
</packet>
Adding a host to ACL twice

This request packet adds host 192.168.34.56 to the ACL two times.

<packet>
<dns>
<add_to_acl>
 <filter>
  <host>192.168.34.56</host>
 </filter>
</add_to_acl>
<add_to_acl>
 <filter>
  <host>192.168.34.56</host>
 </filter>
</add_to_acl>
</dns>
</packet>

Response:

<packet>
<dns>
 <add_to_acl>
  <result>
   <status>ok</status>
   <host>192.168.34.56</host>
  </result>
 </add_to_acl>
 <add_to_acl>
  <result>
   <status>error</status>
   <errcode>1007</errcode>
   <errtext>IP address 192.168.34.56 already exists.</errtext>
  </result>
 </add_to_acl>
</dns>
</packet>