vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* /etc/sysconfig/network-scripts/ ifcfg-eth1 DEVICE=eth1 BOOTPROTO=static BROADCAST=192.0.2.7 IPADDR=192.0.2.2 NETMASK=255.255.255.248 NETWORK=192.0.2.0

GATEWAY=192.0.2.1
ONBOOT=yes



Private Network

The private network settings are in the following file. You need to edit this file with the information that is provided. Replace the example IP addresses with the correct IP addresses from your Private IP block. If the file does not exist, create the file. If the file does exist, replace all data in the file with the following information: Note: The private network WILL NOT have a default route, so the GATEWAY is not defined.



* /etc/sysconfig/network-scripts/ ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static IPADDR=10.0.0.2 NETMASK=255.255.255.248 ONBOOT=yes



Finally, a new route is required to provide private access to the entire private network to include the DNS server, which is done by creating and editing the following file. NOTE: Replace "10.0.0.1" in the example with your private subnet IP gateway.



* /etc/sysconfig/network-scripts/route-eth0 10.0.0.0/8 via 10.0.0.1



DNS Configuration

The primary and secondary DNS configurations are contained in a separate file. You need to edit the file with the following information. If this virtual machine does not have access to the private network, you need to replace the server IPs with the IP addresses of the DNS servers you want to use.



* /etc/resolv.conf nameserver 10.0.80.11 nameserver 10.0.80.12



For these changes to take effect, you need to restart networking on the server. You can restart networking by running the following command:



* service network restart







 Ubuntu and Debian
* Health check events for deleted pools and origins cannot be filtered, but they still appear in the table.
* If you filter Health check events by Pool Health, Degraded pools are included because they technically are healthy, but might contain 1 or more critical origins.
* When adding the request header name for a health check, use Host, capitalized. Using a lower-case host for a health check fails.







 DNS 



* Exporting DNS records includes Cloudflare CNAME records that should be hidden. These records begin with _ and usually have a second record with the same name but the _ is removed.

Ex.
_cf.generate.yourdomain.com 0 IN CNAME address.alias.com
cf.generate.yourdomain.com 0 IN CNAME address2.alias.com

These records must be removed from the zone file to properly import.
* Exporting CAA DNS records does not work correctly. The <tag> and <value> are HEX encoded.

CAA <flags><tag><value>

Ex.
Original CAA record
caa.yourdomain.com. 1 IN CAA 0 issue "letsencrypt.org"

Exported CAA record
caa.yourdomain.com. 1 IN CAA 0 6973737565 "6c657473656e63727970742e6f7267"

These records must be converted from HEX to string or removed and added manually before importing.







 Page rules 



* Updating page rules settings using the CIS plugin for IBM Cloud CLI might result in an error if the page rule ID is not included in the JSON string or JSON file for the update. To work around this, submit the update using a complete JSON configuration file for the page rule, including the ID.
* Removing page rule settings using the CIS UI might not remove the setting, even though the UI reports a successful update. To work around this problem, use the CIS plugin for IBM Cloud CLI to remove the setting and include the page rule ID in the JSON update document:
About resource records 

Resource records provide information about the components that support your domain, and are used to resolve all DNS queries.



 A records 

Most records are A records. This allows the greatest versatility in pointing your domain names where you want them go. Each record consists of a hostname and an IP address.

Host field: The hostname for that particular A record. The hostname should be what precedes the .domain.com in your FQDN (fully qualified domain name). For instance, on www.domain.com, www is the host. Whatever is listed here, the lookup automatically appends .domain.com to the query. A blank A record ( domain.com rather than host.domain.com) is created by putting a @ sign in the hostname field.

Common A records include: www.domain.com, ftp.domain.com, mail.domain.com, webmail.domain.com, mysql.domain.com

Points to field: This field is where you list the IP address to which the hostname should point.





 CNAME records 

CNAME records point to domain names instead of IP addresses. The benefit of using a CNAME record is that you can point a host to a particular domain name, then only modify the target domain name’s A records to have the change take place on both domains. This method is commonly used by those who own several top-level domains (TLD) in different versions (.com, .net, .org, etc.) of the same domain.

For example, you own domain.com and you also own domain.net, and you want the records to point to the same IP address. You can create CNAME records for the www host of domain.net that point to www.domain.com. Then, to change the www host of domain.net all you do is modify the A record of www.domain.com to point to its new IP address, and www.domain.net is automatically updated.

A common mistake when using this method is that you can accidentally modify the records for several domains when you intend to change only one. That is, you must make a note of which domains point to each other.
curl -X GET $DNSSVCS_ENDPOINT/v1/instances/$INSTANCE_ID/dnszones/$DNSZONE_ID/export_resource_records -o dns_records.cfg -H "Authorization: $TOKEN"





 Response 

HTTP 200 is returned with zone file content in byte format









 Using the CLI 

First use the ibmcloud dns instance-target command to set the target operating DNS Services instance.

$ ibmcloud dns instances
Retrieving service instances for service 'dns-svcs' ...
OK

Name ID Location State Service Name
DNS Services-km ffffffff-b042-41fd-885e-000000000000 global active dns-svcs

$ ibmcloud dns instance-target "DNS Services-km"

Store the zone ID in a variable so you can use it in following commands without having to type it every time. For example, to store the zone ID in a variable, run this command:

DNS_ZONE_ID="example.com:f7f40364-a5e6-48f7-9fc9-387434c579ae"



 Creating type A resource record 

Use the ibmcloud dns resource-record-create command with --type A option to create a type A resource record. --name, and --ipv4 are the mandatory options.

$ ibmcloud dns resource-record-create $DNS_ZONE_ID --type A --name www --ipv4 192.168.1.100
Creating resource record in zone 'example.com:f7f40364-a5e6-48f7-9fc9-387434c579ae' for service instance 'DNS Services-km' ...
OK

ID A:f20cfe91-b936-4bad-a8d1-f7afa4ac32a6
Name www.example.com
Type A
Created On 2020-04-10 09:12:07.858707275 +0000 UTC
For more information read through the [Proxying DNS records and global load balancers](https://cloud.ibm.com/docs/cis?topic=cis-dns-conceptsdns-concepts-proxying-dns-records) topic.





 Alternative 1: Proxy, traffic flows through CIS 

This first alternative creates a wildcard certificate for example.com and then proxies it in the IBM Cloud Internet Services (CIS) allowing you to take advantage of industry leading security, protection and performance capabilities.

Currently ordering certificates is by using Let's Encrypt, you may follow the topic [Supported certificate authorities](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-prepare-order-certificatesconnect-certificate-authority) for updates. Using Let's Encrypt requires an ACME account. Follow the steps outlined in the [Connecting third-party certificate authorities](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-add-certificate-authority&interface=ui) topic to create or register your account. In addition, you are required to add a DNS provider following the steps in the [Connecting DNS providers](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-add-dns-provider&interface=uiadd-dns-provider-ui) topic. For this tutorial, you must add CIS as your DNS provider.

Initially HTTPS is configured from the user to Secrets Manager only.



1. Order a certificate in Secrets Manager



* Open the Secrets Manager service and select Secrets on the left.
* Click Add and then TLS certificates.
* Click on the Order a public certificate tile.
* Complete the form:



* Name - type a name you can remember.
* Description - enter a description of your choice.
* Under Certificate authority select your configured Let's Encrypt certificate authority engine.
* Under Key algorithm, pick your preferred algorithm,
* Bundle certificates - leave off
* Automatic certificate rotation - leave off
* Under DNS provider select your configured DNS provider instance
Creating resource record in zone 'example.com:f7f40364-a5e6-48f7-9fc9-387434c579ae' for service instance 'DNS Services-km' ...
OK

ID A:f20cfe91-b936-4bad-a8d1-f7afa4ac32a6
Name www.example.com
Type A
Created On 2020-04-10 09:12:07.858707275 +0000 UTC
Modified On 2020-04-10 09:12:07.858707275 +0000 UTC
TTL 900
Data
ip 192.168.1.100





 Creating type 'SRV' resource record 

Use the ibmcloud dns resource-record-create command with --type SRV option to create a type SRV resource record. --name, --service, --protocol, and --target are the mandatory options.

$ ibmcloud dns resource-record-create $DNS_ZONE_ID --type SRV --name video --service _sip --protocol tcp --priority 10 --weight 10 --port 953 --target media.example.com
Creating resource record in zone 'example.com:f7f40364-a5e6-48f7-9fc9-387434c579ae' for service instance 'DNS Services-km' ...
OK

ID SRV:c7c8938b-87c7-4aee-95fa-63f28452c8d4
Name _sip._tcp.video.example.com
Type SRV
Created On 2020-04-10 09:15:56.940189115 +0000 UTC
Modified On 2020-04-10 09:15:56.940189115 +0000 UTC
TTL 900
Data
port 953
priority 10
target media.example.com
weight 10





 Creating type 'TXT' resource record
Create a VPC instance.
2. Create a DNS Services instance.
3. Add a DNS zone to the DNS Services instance.
4. Designate the VPC instance as a permitted network for the DNS zone.
5. Add a DNS Resource Record to the DNS zone.
6. Verify name resolution of the DNS Resource Record works from within the VPC.



* How is DNS Services different from public DNS?

DNS Services permits name resolution only from permitted VPCs within your IBM Cloud® account. The DNS zone is not resolvable from the internet.
* Can I manage publicly available DNS records with this service?

No, DNS Services only offers private DNS at the moment. Use [CIS](https://cloud.ibm.com/docs/cis?topic=cis-getting-startedgetting-started) for public DNS.
* Is DNSSec supported with zones managed by DNS Services?

DNSSec allows resolvers to cryptographically verify the data received from authoritative servers. DNS Services resolvers support DNSSec for public domains, for which requests are forwarded to public resolvers that support DNSSec. For private zones, since the authority is within IBM Cloud, records are fetched using secure protocols, and are guaranteed to have the same level of privacy and security that DNSSec provides for public zones.
* Is DNS Services regional or global?

DNS Services is a global service and can be used from permitted networks in any IBM Cloud region.
* When creating a DNS zone, what is the purpose of the Label field?

A given instance can have multiple DNS zones with the same name. The label helps to differentiate zones with name collisions.
* How many private zones are supported?

DNS Services supports 10 private zones per service instance.
* How many permitted networks are supported?

DNS Services supports 10 permitted networks per DNS zone.
* How many DNS records are supported?

DNS Services supports 3500 DNS records per DNS zone.
* How do I delete my DNS Services instance?
Setting up your DNS Services instance 

This section describes how to set up a IBM Cloud® DNS Services instance, DNS zones, permitted networks, and resource records.



 Using the IBM Cloud console 



 Creating a DNS Services instance 



1. Open the [IBM Cloud Catalog](https://cloud.ibm.com/catalog/) page.
2. Select the Networking category.
3. Click the DNS Services tile.
4. Choose a plan.
5. Enter Service name and click Create.

You are redirected to the DNS Services instance page showing DNS Zones information.



You can also navigate directly to the DNS Services instance creation by going to the [DNS Services catalog entry](https://cloud.ibm.com/catalog/services/dns-services).





 Creating a DNS zone 



1. Navigate to the Resource page and select your DNS Services instance.
2. On the DNS Zones page, click Create zone.
3. In the Create Zone panel, enter your zone name. Optionally, enter a label and description.
4. Click Create zone in the panel. If the zone is created successfully, you are redirected to the Zone Details page.







 Creating an "A" resource record 



1. Navigate to the Resource page and select your DNS Services instance. Then select your zone.
2. On the DNS Details page, click the DNS Records tab.
3. Click Select record action, and select Add record from the list menu.
4. In the Add Record panel, select the type of DNS record that you want to add from the Type menu. In this case, select the type A.
5. Enter the required data for the type of DNS record you selected. In this case, for type A, enter Name and IPv4 Address.
6. Click Add record in the panel.







 Creating a permitted network 



1. Navigate to the Resource page and select your DNS Services instance. Then select your zone.
2. Click the Permitted Networks tab.
dns-svcs.custom-resolvers.read Get or list custom resolvers. 
 dns-svcs.custom-resolvers.create Create a custom resolver. 
 dns-svcs.custom-resolvers.update Update a custom resolver. 
 dns-svcs.custom-resolvers.delete Delete a custom resolver. 
 dns-svcs.locations.create Add a custom resolver location. 
 dns-svcs.locations.update Update a custom resolver location. 
 dns-svcs.locations.delete Delete a custom resolver location. 
 dns-svcs.forwarding-rules.read Get or list forwarding rules. 
 dns-svcs.forwarding-rules.create Create a forwarding rule. 
 dns-svcs.forwarding-rules.update Update a forwarding rule. 
 dns-svcs.forwarding-rules.delete Delete a forwarding rule. 
 dns-svcs.secondary-zones.read Get or list secondary zones. 
 dns-svcs.secondary-zones.create Create a secondary zone. 
 dns-svcs.secondary-zones.update Update a secondary zone. 
 dns-svcs.secondary-zones.delete Delete a secondary zone. 







 Cross-account zone access events 

The following table lists the actions that are related to cross-account zone access and generate an event.



Table 6. Cross-account zone access

 Action Description 

 dns-svcs.linked-dnszone.create Requestor creates a linked zone. 
 dns-svcs.linked-dnszone.update Requestor updates a linked zone. 
 dns-svcs.linked-dnszone.delete Requestor deletes a linked zone. 
 dns-svcs.linked-dnszone.read Requestor get or list linked zones. 
 dns-svcs.linked-dnszone-access-request.approve Owner approves a access request. 
 dns-svcs.linked-dnszone-access-request.reject Owner rejects a access request.
* UI
* CLI
* API







 Managing DNS zones 

You must have an IBM Cloud® DNS Services instance before managing DNS zones. Refer to [Create a DNS Services instance](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-getting-startedstep-1-create-dns-services-instance) for more information.

A zone can have an arbitrary number of levels, but not fewer than two. For example, ibm.austin.texas.example.com is a valid zone name, but com is not.

You can have multiple zones where one is a suffix to another. For example, sub.domain.example.com and domain.example.com can co-exist.

You can also define subdomains within an added zone. For example, the following are all valid names within the zone domain.example.com.



* subdomain.domain.example.com
* hostname.domain.example.com
* hostname.subdomain.domain.example.com



The name host.sub.domain.example.com might be host.sub within the zone domain.example.com. It might also be host.sub.domain within the zone example.com. Both can exist at the same time, and are separate.



 Known limitations 

The DNS resolver always looks for a record from the longest matching zone, even though the record might not exist in the longest matching zone but does exist in another non-longest matching zone.

Let's say we have two zones, domain.example.com and example.com.

Records for example.com

{
myhost.domain.example.com A 1.1.1.1
me.domain.example.com A 8.8.8.8
}

Records for domain.example.com

{
myhost.domain.example.com A 2.2.2.2
}
internet-svcs.dns-records.create Create a DNS record. 
 internet-svcs.dns-records.update Update a DNS record. 
 internet-svcs.dns-records.delete Delete a DNS record. 
 internet-svcs.dns-records-bulk.create Import DNS records from zone file. 







 List of events: Load balancers 

The following table lists the actions that are related to load balancers and generate an event:



Table 3. Actions that generate load balancer events

 Action Description 

 internet-svcs.load-balancers.create Create a global load balancer. 
 internet-svcs.load-balancers.update Update a global load balancer. 
 internet-svcs.load-balancers.delete Delete a global load balancer. 
 internet-svcs.load-balancer-monitors.create Create a global load balancer health check. 
 internet-svcs.load-balancer-monitors.update Update a global load balancer health check. 
 internet-svcs.load-balancer-monitors.delete Delete a global load balancer health check. 
 internet-svcs.load-balancer-pools.create Create a global load balancer pool. 
 internet-svcs.load-balancer-pools.update Update a global load balancer pool. 
 internet-svcs.load-balancer-pools.delete Delete a global load balancer pool. 







 List of events: Purging the cache 

The following table lists the actions that are related to purging the cache and generate an event:



Table 4. Actions that generate cache purge events

 Action Description 

 internet-svcs.purge-cache-all.update Purge all cached assets of a domain from edge server. 
 internet-svcs.purge-cache-by-urls.update Purge cached assets by URLs from edge server. 
 internet-svcs.purge-cache-by-cache-tags.update Purge cached assets by cache tags from edge server. 
 internet-svcs.purge-cache-by-hosts.update Purge cached assets by hostnames from edge server. 







 List of events: Page rules
You can create CNAME records for the www host of domain.net that point to www.domain.com. Then, to change the www host of domain.net all you do is modify the A record of www.domain.com to point to its new IP address, and www.domain.net is automatically updated.

A common mistake when using this method is that you can accidentally modify the records for several domains when you intend to change only one. That is, you must make a note of which domains point to each other. Also, a record cannot be created with same name as an existing CNAME record.

Host field: The hostname for that particular CNAME record. The hostname should be what precedes the .domain.com in your FQDN. For instance, on www.domain.com, www is the host. Whatever is listed here, the lookup automatically appends .domain.com to the query. A blank A record (domain.com rather than host.domain.com) is created by putting a @ sign in the hostname field.

Points to field: The name that the record points to. This field must be a domain name, and not an IP address. The domain name must also end with a dot. Otherwise, when queried, the domain record will continue until it finds the next dot in the zone file.





 MX records 

An MX record handles the direction of mail.

Priority field: This section allows you to select your preference for an individual MX record. Records are processed in order, starting with the lowest priority and working to higher priorities. Therefore, if you have two mail servers or a mail server and a mail spooler, set the lower priority to your main mail server and set a higher priority to your backup mail server or mail spooler.

Host field: You can specify a mail hostname here, but in most cases, it is not necessary. It is recommended to create a blank host (use a @ for the hostname) and point it to your mail server.

Goes to field: The address of the mail server. What is commonly done here is using the mail hostname that you created in the A record section to point to your mail server.
Check and configure the DNS record 

In this step-by-step example, the DNS service from IBM Cloud® Internet Services is used to manage the DNS zone and its records. In this case, you must ensure a record is created for the FQDN being used. The record should point to the public address to be configured in the Citrix Netscaler VPX virtual server.

The static public IP to be used with the Citrix VPX can be retrieved from the IBM Cloud catalog from the [Device List](https://cloud.ibm.com/docs/citrix-netscaler-vpx?topic=citrix-netscaler-vpx-managing-your-citrix-netscaler-vpxlocating-netscaler-details-in-the-customer-portal) and then selecting the name of your Citrix Netscaler VPX.
Response 

{
"id": "example.com:2d0f862b-67cc-41f3-b6a2-59860d0aa90e",
"created_on": "2019-01-01T05:20:00.12345Z",
"modified_on": "2019-01-01T05:20:00.12345Z",
"instance_id": "1407a753-a93f-4bb0-9784-bcfc269ee1b3",
"name": "example.com",
"description": "The DNS zone is used for VPCs in the us-east region",
"state": "pending_network_add",
"label": "us-east"
}







 Creating a permitted network 

DNS Services allows name resolution only from a VPC that was added to the DNS zone.

When a DNS zone gets created, its Status is PENDING_NETWORK_ADD. To move the zone to ACTIVE state, add an entry for your VPC to the zone's permitted network.

By adding your VPC to your zone's permitted network, compute instances on your VPC can access these resource records.



 Request 

curl -X POST $DNSSVCS_ENDPOINT/v1/instances/$INSTANCE_ID/dnszones/$DNSZONE_ID/acls -H "Authorization: $TOKEN" -d '{
"type": "vpc",
"acl_data": {
"vpc_crn": "crn:v1:staging:public:is:us-east:a/40705ee14536813e2385f26c20be24a5::vpc:ed5e3cdd-8a4f-45ce-bae4-2774cb028caf"
}
}'





 Response 

{
"id": "fecd0173-3919-456b-b202-3029dfa1b0f7",
Exporting your DNS Services configuration 

This section describes how to run a script to copy your IBM Cloud® DNS Services instance configuration. It writes the following to a file:



* All DNS zones and DNS zone data for an instance.
* All resource record data for each DNS zone.
* All permitted network data for each DNS zone.



This data can be helpful in debugging issues and can be provided to the support team (if configuration data is not considered private) in the case of a support issue. The data can also serve as a backup.

This data is "export only" and does not work to import a configuration.



 Usage 

The basic usage is as follows:

$ ./copy_dns_config.sh <instance ID, NAME, or CRN> [path/to/output-file]
 Required: <instance ID, NAME, or CRN>
 Optional: [path/to/output-file]

Where <instance ID, NAME, or CRN> is replaced by the relevant DNS Services instance ID, NAME, or CRN. Optionally, pass a path to an output file as the second argument. If no output file argument is given the output is written to a file in the current directory.

Example usage:

./copy_dns_config.sh my-instance1
./copy_dns_config.sh my-instance2 /dns-output.txt





 Script requirements 



* [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started)



* You must be logged in to your IBM Cloud account.
* Use ibmcloud login to log in.



* [jq](https://stedolan.github.io/jq/), a command line JSON processor.



* $ brew install jq macOS
* $ apt-get install jq Ubuntu









 The script 

!/usr/bin/env bash

 copy_dns_config.sh

 This script will write to a file all the zones, resource records,