Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add static dns entry [closed]

Tags:

ubuntu-12.04

What's the equivalent of hosts files in windows ?

I want to add a dns entry so 'sql1' is pointing to localhost.

I tried adding sql1 127.0.0.1 to /etc/resolveconf/resolv.conf.d/base and then sudo service resolveconf restart, but it's not working. A ping to sql still gives me unknown host sql1.

like image 760
tweetysat Avatar asked Oct 29 '13 07:10

tweetysat


People also ask

Can you use DNS on static IP?

One of the most common DNS configurations when assigning a static IP address to a Meraki device is to use one ISP-provided DNS server and one well-known public DNS service such as Google (8.8. 8.8).

How do you add static DNS entries to a Windows computer?

Right-click the zone where you want to add a resource record, and then click Add DNS resource record. The Add DNS Resource Records dialog box opens. In Resource record properties, click DNS server and select the DNS server where you want to add one or more new resource records.


1 Answers

Edit /etc/hosts

127.0.0.1 localhost sql1
like image 53
Barmar Avatar answered Sep 20 '22 15:09

Barmar