Free Hosting Online for WorkStations

< Previous | Contents | Next >

7.5.2. Creating the /etc/resolv.conf File‌

The system will need some means of obtaining Domain Name Service (DNS) name resolution to resolve Internet domain names to IP addresses, and vice versa. This is best achieved by placing the IP address of the DNS server, available from the ISP or network administrator, into /etc/resolv.conf. Create the file by running the following:


cat > /etc/resolv.conf << "EOF"

# Begin /etc/resolv.conf


domain <Your Domain Name>

nameserver <IP address of your primary nameserver>

nameserver <IP address of your secondary nameserver>


# End /etc/resolv.conf

EOF

cat > /etc/resolv.conf << "EOF"

# Begin /etc/resolv.conf


domain <Your Domain Name>

nameserver <IP address of your primary nameserver>

nameserver <IP address of your secondary nameserver>


# End /etc/resolv.conf

EOF

The domain statement can be omitted or replaced with a search statement. See the man page for resolv.conf for more details.

Replace <IP address of the nameserver> with the IP address of the DNS most appropriate for the setup. There will often be more than one entry (requirements demand secondary servers for fallback capability). If you only need or want one DNS server, remove the second nameserver line from the file. The IP address may also be a router on the local network.


Note

The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.

Note

The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4.


Top OS Cloud Computing at OnWorks: