dns Flashcards

1
Q

What configuration files can you use to filter incoming network traffic over TCP?

A

/etc/hosts.allow

/etc/hosts.deny

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What configuration files can you use to restrict the use of the at command, which is a command that lets you do something at a single specific time

A

/etc/at.allow OR /etc/at.deny

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TXT records:

A

what? any optional information that doesn’t have it’s own field
why? google analytics verification, SPF;
missing? optional, so no problems.
more than one? appended

what? any optional information that doesn’t have it’s own field
A TXT record is essentially a way to provide arbitrary “notes” to outside sources. These may be notes meant for human interpretation, or they may be notes meant to be interpreted and processed by an application or machine, such as the case with SPF records.
why? google analytics verification, SPF;
Services like Google Analytics, and verification methods like SPF, used TXT records in specific formats and syntaxes to be parsed and used by an application to handle them appropriately.
missing? optional, so no problems.
TXT records are entirely optional, and will not interrupt a zone’s ability to load or update if missing. They are not present by default unless through a modified template.
more than one? appended
If you have more than one TXT record, they will all be displayed. Any application reading them should automatically append any additional records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A records

A

what? gives the IP address of the server that handles that domain
if missing? site won’t resolve
more than one? random selection for things like load balancing

what? gives the IP address of the server that handles that domain
An “A” record is used in a zone to instruct servers to resolve a domain name to a corresponding IP address.
if missing? site won’t resolve
At least one A record is required so that the base domain itself has instructions to translate to an IP address. Otherwise, there is no real destination. In effect, this is a good way to point out that, ultimately, the goal is to find out what the destination for your query is, and the IP address represents that destination.
more than one? random selection for things like load balancing
If more than one A record are provided for the same domain or hostname, they will be randomly selected to resolve for queries, which can be used for load balancing or, to a less effective extent, redundancy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MX records

A

what? tells mail where to go.
missing? A record used
more than one? priorities (like for backup MXes)
remote vs local, implications?

what? tells mail where to go.
A MX record represents the “Mail Exchanger” that should be used for this zone in particular. The primary use of the MX record is for determining the appropriate mail servers to use based on an email address (user@domain.com - the MX record of “domain.com” would be resolved).
missing? A record used
If a domain’s zone is missing MX records, the A record for base domain is used instead, which may or may not be the desirable result, so it’s advisable to ensure that at least one MX record exists in each domain’s zone.
more than one? priorities (like for backup MXes)
Additional MX records can be created with varying priorities to create failover support, the lowest number representing the highest priority. Eg.:
MX 0 mx1.cpanel.net
MX 10 mx2.cpanel.net
MX 20 mx3.cpanel.net
In this example, mx1 is used first, then mx2, then mx3, as needed.
remote vs local, implications?
When setting the MX record, it is important to be aware of the resolving address for the hostname or domain that you’re using in that record.
Local Mail Exchanger:
If the resolving IP address is an IP address that exists on your server, then it should be considered a “local mail exchanger”. This relates to how mail destined for that domain is handled. If Exim is handling a message sent to a domain with local MX, the server knows that it doesn’t need to deal with any remote routing rules, and it can handle it locally.
Remote Mail Exchanger:
Some domains may be handled by a remote mail exchanger, or mail server that exists elsewhere, such as when a google apps setup is used, for example. This ensures that Exim knows that the mail bound for this domain needs to leave the server to properly reach its destination.
In general, you can leave this on the default of “Automatic”, which will determine whether the destination IP address exists on your server or not, and choose accordingly. However, it’s important to be aware that misconfigurations in can cause problems for mail delivery to/from your domains.
One common issue you might see when a domain has been selected as remote/local MX incorrectly is the Sender Verification Failure error. If this occurs, verify that all of your domain’s MX records are properly set with local/remote or that the automatic selection is using the correct option. If the automatic selection isn’t working correctly, this likely indicates that there may be other network-related configuration issues on the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

NS records

A

what? confirms what nameservers should be authoritative. only for the zone (not subdomains - if subdomains, then it’s forwarding the domain)
missing? zone is not valid, but will load w/o issue.
more than one? should have more than one. random selection for load balancing

what? confirms what nameservers should be authoritative. only for the zone (not subdomains - if subdomains, then it’s forwarding the domain)
The NS (Name Server) records in a DNS zone are used to define what should be considered as the authoritative nameservers for that zone as a whole.
missing? zone is not valid, but will load w/o issue.
If the NS records are missing from the zone, which they will not be when using the default template at the beginning, the zone will technically fail a validity check performed by named, however the zone itself will still load.
more than one? should have more than one. random selection for load balancing
A typical zone should usually have at least 2 NS records defined for very basic redundancy. This is not required, but always highly recommended. The ideal scenario is that you have two separate nameservers on two separate hosts, so that if an issue occurs on one host, the domain can still be resolved using the other host.
This can be expanded as much as needed, and there is no unreasonable limit on NS records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CNAME

A

what? acts as an “alias”, should point to a resolving FQDN, or another A record that exists in the same zone.
missing? not required.
more than one? can only have one for one domain, and cannot have equivalent A record

what? acts as an “alias”, should point to a resolving FQDN, or another A record that exists in the same zone.
A CNAME record is essentially what amounts to an alias for another record. For example, say you have your base domain record:

cars.tld. IN A 1.2.3.4

This represents the domain “cars.tld”, and points to the IP address 1.2.3.4. What if we want to add in a few subdomains, but we know that they’re also going to go to 1.2.3.4? One easy way to do this would be to add CNAMEs, and point them to “cars.tld”. For example, let’s add mail, www, and ftp CNAMEs, such as those that are in our default template:

mail IN CNAME cars.tld.
www IN CNAME cars.tld.
ftp IN CNAME cars.tld.

Now, resolution will be handled like this:

mail. cars.tld -> cars.tld -> 1.2.3.4
www. cars.tld -> cars.tld -> 1.2.3.4
ftp. cars.ld -> cars.tld -> 1.2.3.4

Alternatively, you can also specify full, remote domain names to direct a CNAME to, as some load balancing or proxy services require. The important thing to note here is that, if you’re including the full domain name as the CNAME record destination, you’ll need to make sure that the trailing “.” is included to indicate that this domain is complete, and that it does not need to subsequently add the base domain onto it.
missing? not required.
These are not required to load or validate a zone successfully.
more than one? can only have one for one domain, and cannot have equivalent A record
A CNAME should be independent of any conflicting names, and the host it uses should be exclusive. For example, if you’ve defined a “mail” CNAME to point somewhere, you should not have a “mail” A record elsewhere in the zone, and there should only be one “mail” CNAME in place.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

explanation of TTL and its implications?

A

what? server’s preferred (“recommended”) length of time that clients should cache DNS zone data.
missing? a value for this is needed for the zone to load, but defaults will be present if none are changed

what? server’s preferred (“recommended”) length of time that clients should cache DNS zone data.
The TTL, or “time to live”, defines how long (in seconds) a zone should be cached by caching nameservers before it is checked for updates. This acts primarily as a “preference”, however, because many, if not most, caching nameservers will set their own minimums and may ignore the TTL value defined on your server, to prevent abuse, and to accommodate for their individual environments.
missing? a value for this is needed for the zone to load, but defaults will be present if none are changed.
Values for TTL are needed for the zone to load, however, if they have not been changed, the defaults (86400, which equates to 24 hours) will be present on initial zone creation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Nameserver and how does it work?

A

why you need it:
turns domain names into IPs (and vice versa)
email systems use it as part of spam prevention algorithms
DNS root servers and how the authoritative server is found
root nameservers get info from whois system.
answers cascade down as folks ask for the info
setting up your cPanel server as authoritative at the registrar
every registrar is different; consult your registrar for instructions
propagation
not much of a prob anymore, now like 10 min instead of a day or two

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Role of the hostname?

A

FQDN
Mail verification
Better as its own zone with an existing domain, or as an independent A or CNAME record?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

BIND

A

By far the most widely used DNS software, making it essentially the standard. It’s age and extensive development make it a good choice for most servers. That said, it comes with a hefty footprint on your server, and in situations where a very, very large number of zones are going to be in use, BIND’s start-up process of loading all of the zones can take significantly longer to complete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

MyDNS

A

This DNS software is different in that it stores zone data within a MySQL database, which may or may not be a good thing, depending on your pre-existing reliance on MySQL, and your existing MySQL performance or optimizations. In addition to that, memory cache is utilized to boost the speed of DNS queries. In contrast to BIND’s performance issues when loading a very large number of zones, MyDNS is able to circumvent this with its zone handling, and as a result it can be the preferred choice in situations where a huge number of zones are involved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

NSD

A

NSD works as a very lightweight nameserver with a tiny footprint on the server, making it optimal on very limited systems or on systems with only a handful of zones and no need for caching capability or additional configuration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

3 nameserver softwares provided by whm?

A

WHM provides you with 3 different options for hosting your DNS environment, each providing their own strengths and weaknesses. For most environments, we recommend using the default of BIND, due to its reliability, integration, and established standards, however you may wish to try one of the alternative options if they work better for your circumstances:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SPF

A

An SPF (Sender Policy Framework) record is one way that mail servers can validate legitimacy of mail servers, to lessen the chances of spoofed spam messages being sent out using one of your domains. The SPF record format provides a way of identifying which servers can send email for a domain, and supporting mail servers on either end of a mail transaction can choose to enforce this. It’s used commonly enough today that it’s almost always recommended as a standard way of improving your mail server’s credibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DKIM

A

DKIM (DomainKeys Identified Mail) provides a way of signing your email with a signature, essentially vouching for the authenticity of your mail server by allowing it to be tracked back to the originating mail server and matched. These signatures are added into the message header.

17
Q

What is a PTR record

A

synonymous with ‘reverse dns’
Where a typical DNS translation will involve taking a domain and translating it to an IP address, a PTR record resolves the other way around - an IP address into a domain. It’s essentially a backwards A record.
Ideally, you’ll want to set up at least the PTR record of the primary IP address of the server, so that it resolves back to the hostname of your server. If, however, you’ve set up Exim to use any IP address other than the primary, that IP address should have a PTR record to resolve it to the hostname, instead.
The reason that PTR records are helpful, is that it provides yet another means of validating the legitimacy of your mail server, to other mail hosts involved in a mail transaction with you. There are a number of ways to spoof emails, but if the IP address that sent the mail can be confirmed to come from the correct hostname, the risk of this is significantly lessened. So the result is that your mail server’s overall reputation will benefit from the proper use of these records.
Info: It may be useful to be aware that PTR is sometimes referred to as Reverse DNS - these two are essentially synonymous, and should be treated as the same thing. The terminology is interchangeable, here.

18
Q

find the auth nameserver for the IP

A

A PTR record, in order to be effective, must be created on the authoritative nameservers for the IP address in question. If your servers are not the authoritative nameservers, you can choose to either contact your upstream provider to delegate authority to your nameservers, or request that they make the PTR adjustment directly, which is more often the case.
To determine what the current authoritative, you’ll first need to understand the way that a standard PTR zone for an IP block will look like. True to form, the zone will be formatted with the first 3 octets (an octet is one ‘section’ of the typical, 4-piece IP address) of the IP address, reversed, then followed by in-addr.arpa. Let’s look at a couple of examples:

Server IP: 57.256.58.30
Associated PTR Zone: 58.256.57.in-addr.arpa

Server IP: 57.256.58.21
Associated PTR Zone: 58.256.57.in-addr.arpa

19
Q

Why to use clustering?

A

cluster is a group of servers that all do the same job
redundancy : a server or record that is designed as a backup in the event that the primary server fails

redundancy
Clustering allows your zones to be stored across a distributed set of servers, so that, if a client is unable to reach one server, it can fail over on to one of the other servers in the cluster, depending on the configuration and the defined, authoritative servers. Redundancy is always recommended, if possible, and helps to maintain a more reliable DNS service.
reduced load on the WHM server
In addition to redundancy, clustering also allows you to distribute the overall query load across multiple servers, so that the impact is not concentrated all on to one or two servers alone. In heavy

20
Q

what clustering does not do for you

A

synchronize data outside the DNS
DNS clustering is a very useful technology, but it doesn’t solve all problems. DNS clustering only provides redundancy for DNS data. It does not synchronize website data or email. If the main WHM server is down, websites and mail will be inaccessible until the main WHM server becomes available again.

21
Q

what is dns only and why use it

A

A DNS Only server is a limited cPanel environment that is designed solely to function as a single node in a DNS cluster. These work well as additional load balancing or redundancy nodes, but are not intended to perform any other major cPanel functions.

22
Q

outgoing ip address

A

outgoing IP address - the IP address seen by the world when you make connections outbound from your server

23
Q

client ip address

A

client IP address - the IP address used by the clinet connecting to your server

24
Q

public ip address

A

public IP address - the IP address that is used by the internet to connect to your server

25
Q

private ip address

A

private IP address - the IP that is used by the local network to connect to your server

26
Q

1:1 NAT

A

1:1 NAT - a Network Address Translation setup where one public IP is associated with one private IP.

27
Q

how ssl works

A

The handshake uses the public-key encryption included in the certificate to set up a shared secret

Client: hi server, I want to connect securely, who are you?
Server: hi client, here’s my certificate proving who I am
Client (checks certificate for expiration date, chain of trust, and that the connection is to the right place): OK. here’s a shared secret key that I’ve encrypted with your public key
Server: thanks. I agree, we should use this shared secret from here on out. In fact, I’m using it already for this transmission.

28
Q

what is SNI

A

Server Name Indication

allows virtual hosts for SSL too

29
Q

mydns config

A

/etc/mydns.conf

30
Q

nsd config

A

/etc/nsd.conf

31
Q

BIND/named - folder where dns zone files are stored

A

/var/named

32
Q

BIND/Named - config

A

/etc/named.conf

33
Q

lists what files and servies are responsible for which types of lookups

A

/etc/nsswitch.conf

34
Q

servers to ask when this server is not authoritative for the zone

A

/etc/resolv.conf

35
Q

list of zones that can be resolved without the DNS

A

/etc/hosts

allows user to bypass the DNS and use locally defined values
used for testing purposes