How to setup a DNS Server on ubuntu 12.04
Tech-Today

How to setup a DNS Server on ubuntu 12.04


This tutorial will help you in setting up a dns gateway in your ubuntu machine (I'm using 12.04 version, not sure if this would work on others).

First we need to install bind9, which is a dns server:

sudo apt-get install bind9

Open /etc/bind/named.conf.local and replace with:

acl internal {
10.0.0.0/8;
localhost;
};

view "internal-view" {
match-clients { internal; };
include "/etc/bind/named.conf.default-zones";

zone "ipiel.net" {
type master;
file "/etc/bind/zones/db.ipiel.net";
};

};

view "external-view" {
match-clients { any; };
include "/etc/bind/named.conf.default-zones";
};
Then create a file: /etc/bind/zones/db.ipiel.net, with the following contents:
$TTL 300
@ IN SOA ipiel.net. hostmaster.ipiel.net. (
2012091800 ; Serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
300 ) ; Negative Cache TTL

$ORIGIN @
NS ns1.ipiel.net.
A 10.1.1.69
ns1 A 10.1.1.55
IN MX 10 mail.ipiel.net.

www IN A 10.1.1.69
po1 IN A 10.1.1.69
db1 IN A 10.1.1.55
gw1 IN A 10.1.1.55
gw CNAME gw1
po CNAME po1
db CNAME db1

The settings means that I have 3 servers:
1.) portal - po1, po
2.) gateways - gw1, gw
3.) database - db1, db

These settings are useful when you have a client (mobile app or another web application on another machine) and you don't want to change the IP setting. Because in mobile that means rebuild and redeploy. When you have these settings all you need to do is change your dns setting to 10.1.1.55, or the machine ip where you install  and configured bind9.

Finally edit, /etc/bin/named.conf and comment this line:
include "/etc/bind/named.conf.default-zones";

Restart bind9
sudo /etc/init.d/bind9 restart

In another machine all you need to do to change your dns server is to edit /etc/resolv.conf and add
nameserver 10.1.1.55




- How To Handle An Xmlrcp Wordpress Attack On Nginx Server
I'm not really a system administrator and these steps are just based on my personal experience in securing our own wordpress websites. Lately there has been a lot of attacks on wordpress sites (since it's a popular framework) specially on windows...

- How To Create A Modularized Ear Project In Maven
This post is one way of creating a typical javaee6 maven project that contains ear, web, ejb and api. The output of course is an ear file that contains (web, ejb and api). How it looks like (assuming our top project is named ipiel): +ipiel  +ipiel-ear...

- How To Install Subversion And Websvn On Ubuntu 12.04
This write-up contains a set of instruction on how to install and configure svn as well as setup websvn on an ubuntu 12.04 machine. 1.) Install subversion and apache2 sudo apt-get install subversion sudo apt-get install apache2 sudo apt-get install libapache2-svn...

- Persist Jms Message In A Database In Glassfish
This tutorial will guide you on how to configure Java Messaging Service in Glassfish to store JMS message in a postgresql database. What you need (configured and running): 1.) Glassfish 3.1.2.2 2.) Postgresql 9.1 3.) JMS Broker (integrated with Glassfish)...

- How To Start/stop An Application On Boot On Ubuntu Like Services.msc In Windows
There's an easy way now to configure what application runs on ubuntu's startup like services.msc in windows. Rather than adding/modify some configuration, we can install a simple GUI that can do the job. sudo apt-get update sudo apt-get install...



Tech-Today








.