The NS1 Filter Chain allows you to apply advanced processing logic to your DNS answers to ensure that requesting clients are directed to the optimal endpoint based on the characteristics of the requesting client and/or the target endpoint.
Before you can create a Filter Chain, you must first create a DNS zone and add records to the zone including multiple DNS answers.
In the NS1 Connect portal, click DNS in the main navigation. By default, the Zones page displays, showing you a list of the zones assigned to your account.
Click the name of a zone to open its zone details, including a list of the records (if any) that are associated with the zone.
Click the name of the record within which you want to apply a Filter Chain configuration. When you drill down into a record, you can see the DNS answers (i.e., endpoints) within that record. These were either specified during record creation or added later.
If you haven't added answers to the record or if you need to add more answers, click Add Answer and enter the necessary information. The format of the answer will vary depending on the type of record you're working within. Within A or AAAA records, for example, each answer corresponds to an IPv4 or IPv6 address, respectively. Once complete, click Save Record to save your new answers.
Click Create Filter Chain. A list of filters opens, and you can add filters to the record's Filter Chain by clicking the + to the left of the name of the filter you want to add. Filters are processed from top to bottom, so ordering is important. You can reorder filters as needed by dragging and dropping them.
NS1 offers a variety of filters that are organized into the following categories:
Refer to any of the articles linked above to learn more about the individual filters within each category. Additional, refer to Best Practices: NS1 Filter Chain to learn more about using the Filter Chain to process DNS queries.
Some filters have some additional configurable settings. Click the name of the filter to view a description and any additional settings you can configure. Once complete, click Save Filter Chain. The new Filter Chain configuration appears to the left of the answer list.
Click the name of the filter to view the corresponding metadata fields for each answer. This metadata field is what that filter references when making routing decisions. For example, the Up filter references the up metadata field to see if it is set to
false. At this point, the metadata field is likely empty, so you must edit the answer metadata or configure automatic updates from a native or third-party data source.
Click the label beneath each answer to edit that metadata field.
In the Answer Metadata modal, you get a filtered view that only shows the selected metadata field. You can set the metadata value manually or click the feed icon to attach an existing NS1 monitor or data source to automatically update this field as conditions change. Note that changes made on this screen are saved automatically. Once complete, click OK to exit the modal.
You can view all metadata fields by clicking Show all metadata.
Repeat this step to edit this metadata field for all answers.
Repeat steps 7 and 8 for all other filters in the Filter Chain configuration, editing the relevant answer metadata where applicable.
Some filters do not reference specific metadata fields (e.g., Select First N filter).
Once you have updated all the relevant metadata field(s) for each answer, click Save Record. Now, as DNS queries are made against the record, each filter eliminates or rearranges answers based on their metadata field or some other specified criteria. The answers that make it through the Filter Chain are returned to the requesting client.