Rabu, 27 Agustus 2014

Check BIND – DNS Server configuration file for errors

by  on SEPTEMBER 21, 2007 · 12 COMMENTS· LAST UPDATED OCTOBER 12, 2007
You can use a tool called named- checkconf to check BIND dns server (named daemon) configuration file syntax under Linux / UNIX. It checks the syntax, but not the semantics, of a named configuration file i.e. it can check for syntax errors or typographical errors but cannot check for wrong MX / A address assigned by you. Nevertheless, this is an excllent tool for troubleshooting DNS server related problems.

How do I check my bind configuration for errors?

Simply run command as follows:
# named-checkconf /etc/named.conf
You may want to chroot to directory so that include directives in the configuration file are processed as if run by a similarly chrooted named:
# named-checkconf -t /var/named/chroot /etc/named.conf
If there is no output, the configuration is considered correct and you can safely restart or reload bind configuration file. If there is an error it will be displayed on screen:
# named-checkconf /etc/named.conf
Output:
/etc/named.conf:58: open: /etc/named.root.hints: file not found

How do I check my zone file configuration for errors?

Use named-checkzone to check the zone files as follows: named-checkzone nixcraft.com /var/named/zone.nixcraft.com

Minggu, 03 Agustus 2014

FreeBSD Install and Configure Webmin Web-based Interface ( Control Panel )


by  on JULY 7, 2008 · 
http://www.cyberciti.biz/faq/freebsd-installing-webmin/
Q. How do I install webmin control panel for my FreeBSD server?

A. Webmin is a web-based interface for system administration for Unix including FreeBSD. Using any browser that supports tables and forms, you can setup user accounts, Apache, DNS, file sharing, firewall and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/master.passwd.

Install webmin

To install webmin, update your ports, enter:
# portsnap fetch update
Install webmin from /usr/ports/sysutils/webmin, enter:
# cd /usr/ports/sysutils/webmin
# make install clean

Configure webmin

Now, webmin is installed. Start webmin on startup, enter:
# vi /etc/rc.conf
Append following line:
webmin_enable="YES"
Save and close the file. You need to run /usr/local/lib/webmin/setup.sh script in order to setup the various config files, enter:
# /usr/local/lib/webmin/setup.sh
Sample output:
***********************************************************************
*            Welcome to the Webmin setup script, version 1.420        *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /usr/local/lib/webmin ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Log file directory [/var/log/webmin]: [Press Enter]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):  [Press Enter]
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name:    FreeBSD
Operating system version: 7.0
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
 - What port to run the web server on. There must not be another
   web server already using this port.
 - The login name required to access the web server.
 - The password required to access the web server.
 - If the webserver should use SSL (if your system supports it).
 - Whether to start webmin at boot time.
Web server port (default 10000):  [Press Enter]
Login name (default admin):  [Press Enter]
Login password: [type password]
Password again:
Use SSL (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done

How do I view webmin?

Fire a webbrowser and enter url:
https://your-domain.com:10000/
OR
https://your-server-ip:10000/
You should see login html form as follows:

(Fig. 01: - Webmin in action under FreeBSD)