How to create a DNS

You can create a Domain Name Service so that users can access your compute via the domain name instead of a floating or private IP address.

1. How to create a public DNS

  1. Connect a Compute to the Public network.

  2. Click on the network port and set the dns_name.

../_images/dns1.png

Figure 1. Compute in a public network

  1. Input the Domain and Subdomain field (e.g., myexample.com and www, respectively)

../_images/dns1b.png

Figure 2. Input

Important

  • The domain must be globally unique in the Domain Name Service of Open Telekom Cloud.

Note

  • Blank subdomain: Traffic will be routed to the domain myexample.com.

  • Subdomain "www": Traffic will be routed to www.myexample.com, which is usually used for a website.

  • Subdomain "*": Traffic will be routed to any subdomain of the domain.

Expect result

  1. One DNS public zone myexample.com. with one record set type A www.myexample.com. pointing to the floating IP of the public compute (e.g., 80.158.91.193).

../_images/dns2.png

Figure 2. Record set points to floating IP address

Test

  1. Update your domain name at the registration service to the nameservers of Open Telekom Cloud: ns1.open-telekom-cloud.com and ns2.open-telekom-cloud.com. Or to test on localhost, update the nameservers of your localhost to the nameservers of Open Telekom Cloud.

  2. Test your domain is resolved to the floating IP:

$ dig www.myexample.com

;; QUESTION SECTION:
;www.myexample.com.   IN  A

;; ANSWER SECTION:
www.myexample.com.  300 IN  A 80.158.91.193

Note

  • The DNS zone takes effect only after you update the nameservers of your domain at the domain registrar to: ns1.open-telekom-cloud.com and ns2.open-telekom-cloud.com

Important

Swiss Open Telekom Cloud does not support DNS public zone, but only DNS private zone. When you set a dns_name to a network port, a DNS private zone will be created instead.

2. How to create a private DNS

  1. Put the compute in a private network (i.e., the network port does not connect to a public network)

  2. Click on the network port and set the dns_name (same as above).

../_images/dns3.png

Figure 3. Compute in a private network

Expect result

  • One DNS private zone myexample.com. with one record set type A www.myexample.com. pointing to the private IP address of the network port (e.g., 10.0.0.147)

../_images/dns4.png

Figure 4. Record set points to private IP address