Disabled Sendmail Service on FreeBSD

Disabled Sendmail Service on FreeBSD is slightly different compare to Linux. We usually disabled Sendmail Service and configure exim on FreeBSD. Sendmail service can be disabled via /etc/rc.conf.

Put these lines into /etc/rc.conf


After that restart sendmail service

/etc/rc.d/sendmail restart

If you would like sendmail to be able to host outgoing email. Put these lines in /etc/rc.conf


After that restart sendmail service

/etc/rc.d/sendmail restart

Turn on DNS Query Log on Bind

You are running a recursive DNS server and would like to find out the statistic of your user browser behavior (Whether they browse Facebook or Google?). Turn on DNS query logs will allow you to find out the statistic. To turn on DNS query log in Bind, configure lines below on named.conf

        channel query_logging {
                file "/var/log/query.log" versions 3 size 10m;
                severity debug 3;
                print-time yes;
                print-severity yes;
                print-category yes;

        category queries {

To turn on query logging while DNS service is running; you need to to rndc querylog and check the status with rndc status

shell> rndc querylog
shell> rndc status 
version: 9.x.x
number of zones: 1200
debug level: 3
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is ON
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

query logging is ON indicates that DNS query logging is activated.

Create Root Privilege User on MySQL

By default, MySQL root privileges user is “root”, I always remove “root” userid once I got MySQL installed, mainly for security purpose, secondly I do not want stupid thing happened like someone able to brute force into MySQL database.

You can create “root” alike privilege user in MySQL by following the step below;

  • Access to mysql /usr/local/bin/mysql
  • mysql> GRANT ALL PRIVILEGES ON *.* TO ‘yourusername’@’localhost’ IDENTIFIED BY ‘yourpasswordhere’ WITH GRANT OPTION;
  • mysql> flush privileges;
  • mysql> quit;

You can add a few more privileges user if you have more than 1 person to admin MySQL Database.

Reset MySQL Root Password

Very often, once we didn’t log on to MySQL database for some time, I guess most of us will forgot the root password. Can we reset the root password? Obviously… Nothing is Impossible :P

Follow the steps below to reset MySQL’s Root Password;

  • Stop MySQL Service
  • Start MySQL Service in Safe Mode: /usr/local/bin/mysqld_safe –skip-grant-tables&
  • Connect to MySQL /usr/local/bin/mysql
  • mysql> use mysql;
  • mysql> UPDATE user set password=password(‘newpassword’) where user=’root’ and host=’localhost’;
  • mysql> flush privileges;
  • mysql> quit;
  • Stop MySQL Service Again
  • Start MySQL Service in normal mode

Log in to MySQL with your newly created password.

How to do DNS Setup On your Machine

Most of us know, without DNS Setup on your machine or PC, you can’t browse on the website at all, DNS setup is a must, cause what DNS does is translate the Domain Name to IP Address in order to reach the server.

What DNS Server to use? We will use OpenDNS server for DNS Setup.

DNS Setup on Windows Vista

On your Windows Vista, follow the step below;

  • Click on “Windows Start Button”, then select “Control Panel”.
  • Click on “Network and Internet”
  • Click on “Network Center”
  • Click on “Personalize”, next to your network
  • Click on “Properties” button.
  • Another window will pop up – click on “Properties” button, again
  • Vista will ask for your permission to make changes. Click “Continue” button.
    Make sure you have administrative rights on your system before making changes.
  • Select “Internet Protocol Version 4 (TCP/IPv4)”, then click on “Properties” button.
  • Click the radio button “Use the following DNS server addresses” and type in OpenDNS addresses in the “Preferred DNS server” and “Alternate DNS server” fields.
  • Preferred DNS server address for Open DNS is:
    Alternate DNS server address for Open DNS is:

  • Click on “OK” button.
  • Restart your computer.
  • DNS Setup on Apple Mac OS X

    On Apple Mac, follow the steps below for DNS Setup;

  • Click on the Apple icon on top left menu
  • Select System Preferences
  • Click on Network
  • On DNS Server, type:,
  • Click on Apply. That’s all
  • DNS Setup is pretty easy, happy browsing!