LDNS is a simple yet powerful shell script designed to streamline server management by eliminating the need to manually look up IP addresses for servers without public DNS configurations. If you've ever found yourself frustrated with managing server connections by IP addresses alone, LDNS provides an efficient solution by allowing you to easily add or remove entries in your system's hosts file.
With LDNS, you can reference a server's IP address using a hostname on your local machine.
- Add or remove hostnames for quick local reference.
- Simplify SSH or other network connections by using hostnames instead of IP addresses.
For example, running the following command:
sudo ldns add richclient.server 42.x.x.x
will enable you to replace:
with:
To add a hostname to your system's hosts file, use the following command:
sudo ldns add <hostname> <IP>
Example:
sudo ldns add richclient.server 42.x.x.x
To remove a previously added hostname from the hosts file, run:
sudo ldns delete <hostname>
Example:
sudo ldns delete richclient.server
List all the hostname in /etc/hosts
sudo ldns list
LDNS is a simple but effective tool that saves you time and effort when managing server connections locally.