(How-To) Problem with 127.0.0.1

1 post / 0 new
#1 Fri, 04/13/2018 - 21:50
Diabolico
Diabolico's picture

(How-To) Problem with 127.0.0.1

Does this two sentences look familiar...

Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.


... especially after the server restart.

Easy and quick solution:
1. Go to /etc/dhcp/.
2. Use Nano, Vim or some software like WinSCP and create dhclient.conf file with content:

send host-name = "hostname.yourdomain.tld";
supersede domain-name "yourdomain.tld";
supersede domain-search "yourdomain.tld";
supersede domain-name-servers 127.0.0.1, 8.8.8.8, 8.8.4.4, xxx.xxx.xxx.xxx;

Replace x's with your server IP address.
3. Save/close dhclient.conf file and restart the network with service network restart or systemctl restart network (or restart your server).
4. Go to Virtuallmin -> System Settings -> Re-Check Configuration and see what results you get this time.

Tested:
OS: Centos 7.4
Virtualization: KVM, OpenVZ

P.S. While i tested on two separate VPS from two separate companies and it worked without any problem, use a caution as you are playing with a network.