Posted by: mahinctg | October 17, 2009

Qmail Double Bounce

If you are using Qmail you have encountered this type of Bounce Messages “I tried to deliver a bounce message to this address, but the bounce bounced!”. You can get rid of such message following this process.

First Make an email id like dblbouncedel@yourdomain.com then make a file /var/qmail/control/doublebounceto with this line in it

dblbouncedel@yourdomain.com

Then make .qmail file in the under the dblbouncedel@yourdomain.com with this line in it :

|exit 0

Think this will solve your Double Bounce Problem.

Posted by: mahinctg | September 16, 2009

DNS Configuration in CentOS 5

Configuring a DNS in CentOS 5 in a Bit Different then Doing it in Fedora Core 3, which was my primary OS for my servers till now. But due to compatibility and Update Issue I’m moving to CentOS. Currently Using CentOS 5.3

I’m assuming that you have Installed DNS server at the time of Installing the Server. Now first just find the sample files that are inside a Dir like this Location “/usr/share/doc/bind-9.3.4/sample/” (May Difffer as per u r bind version) and copy those files in the related /var/named/chroot/etc/ and /var/named/chroot/var/named Dir and also make a link with this command “ln -s /var/named/chroot/etc/named.conf /etc/named.conf”.  Now Edit the named.conf file. sample.named.conf.

You have to generate a Key to use Inside the named.conf file inside the ” ” in the secret option. Use this to generate the key “/usr/sbin/dns-keygen” and copy the key and paste it in named.conf under “ddns_key” -> secret ” “.

Now create the zone file under /var/named/chroot/var/named with the file name you declared in named.conf and save it. linuxcourse.com Now start up Named service and chk /var/log/messages for any error. If you have done it properly your Zones are now loaded and you can chk with the dig command but remember you should have your DNS server’s IP in /etc/resolve.conf as the first one to resolve it Via your DNS.

Now also make sure that Named service will run at startup “chkconfig –level 345 named on”.

Posted by: mahinctg | September 12, 2009

OS Imaging

I as looking for a Open Source Imaging Solution. I came acceross this nice package known as Clonezilla. U can download the ISO from here http://clonezilla.org/ . Burn the ISO in a CD and Boot up the System u want to Clone or make an Image. This can Take Image of the Whole HDD with Partition info or of a single/multiple Partition. The Compressin ratio is also quite good and u can write u r Images file in a Pen drive also, Just make sure that the Pen Drive is Formatted with NTFS. The Software is Simple Menu driven and easy to use. Very easy to take Backup and also to restore. U can take Any HDD image regardless what OS it runs. And the most Important thing is It’s Quite Fast. Try it out, I’m sure U’ll like this App.

Posted by: mahinctg | June 21, 2009

Working with Yum

Those who are still using Fedora Core 3 for their systems might have problem with Yum updating different packages. I solved mine with this process.  Move all the files under /etc/yum.repos.d/ to a different location. Create a file named fedora-updates.repo in there and put this inside the file and save it.

[updates-released]
name=Fedora Core $releasever – $basearch – Released Updates
baseurl=http://archive.kernel.org/fedora-archive/fedora/linux/core/updates/$releasever/$basearch/
enabled=1
gpgcheck=1

Now run Yum. Think your problem is solved…….

Posted by: mahinctg | June 20, 2009

Windows – Bangladesh Day Light Saving

Windows users… Pls Download this file Timezone_Fix. Rename this file from “Timezone_Fix.doc” to “Timezone_Fix.msi”. Then Install It.

From Control Panel > Date and Time > Time Zone select “(GMT+6:00) Dhaka” instead of “(GMT+6:00) Astana/Dhaka”

Works in XP, Vista, Server 2003, Server 2008.

Posted by: mahinctg | June 20, 2009

NTP Server – Bangladesh Day Light Saving

Those who are using NTP server in Fedora Core – 3 in Bangladesh might find this topic help full. I searched the Net for tzdata update for FC3 but no luck. Then I just Update tzdata on a CentOS 5.1 system and just Imported the Zone File. The zone file you can download from Dhaka_DST_New. Just rename it from Dhaka_DST_New.doc to Dhaka_DST_New

Copy it to your NTP System. Then Take a backup of your current zone file “cp /usr/share/zoneinfo/Asia/Dhaka /root/Dhaka_Old” then copy the New filw to that location “cp Dhaka_DST_New /usr/share/zoneinfo/Asia/Dhaka”. Now pls chk if have a soft link or file in /etc/localtime

ls -l /etc/ | grep localtime
lrwxrwxrwx    1 root root      30 Jun 20 14:48 localtime -> /usr/share/zoneinfo/Asia/Dhaka

If it is a link then your done else remove the file “rm -rf /etc/localtime” and create a soft link “ln -fs /usr/share/zoneinfo/Asia/Dhaka /etc/localtime”. I got it working like this ….. Hope this will help someone… :)

Posted by: mahinctg | May 3, 2009

Automated Putty Login

Posted by: mahinctg | April 30, 2009

Connecting to OpenVPN from Windows via OpenVPN GUI

You can Connect to a OpenVPN Server from your Workstation by using OpenVPN GUI.

After Installation of OpenVPN GUI Generate Keys for your new client in your OpenVPN Server. Then Copy ca.crt and the new client.crt and client.key files to your Windows PC in OpenVPN install folder under config subfolder. Then Copy the client.ovpn from the sample-config subfolder to config subfolder. Edit the file client.ovpn. Then define your Remote OpenVPN server ip like this “remote xxx.xxx.xxx.xxx 1194″ and also chk this entrys “ca tmp-ca.crt” “cert client.crt” “key client.key” so that they reflect the key names that you have copied from the server to config subfolder. Now from the OpenVPN GUI Icon in your taskbar, Right Click on it and click Connect. If you did everything correctly you would be able to connect your VPN Server and access the Network behind that server. :)

You can download OpenVPN GUI from Here. Just rename it to .exe from .doc openvpn-209-gui-103-install

Posted by: mahinctg | April 8, 2009

Open DNS Server

An open DNS server is a DNS server which is willing to resolve recursive DNS lookups for anyone on the Internet. This is similar to the better known “open relay” term used about mail servers which will forward e-mails (including spam and viruses) for anyone.

When a DNS server resolves a recursive DNS lookup, it tracks down information about a domain name hosted on some other DNS server somewhere else on the Internet (a recursive process involving several other DNS server).This DNS server feature is one of the corner stones of the whole Internet idea and is relied upon by all Internet client applications such as browsers and e-mail clients.

Unfortunately hackers have also found this feature useful in performing a special type of DDOS attack called a “DNS Amplification Attack”.
#### Ref From http://www.simpledns.com/kb.aspx?kbid=1186 ####

If you are using BIND for your DNS server you can easily Stop your server doing Recursive lookups for IP’s that dosent belong to your network. Add this In your named.conf file in the Options Section :

allow-recursion { 127.0.0.1; xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx;};

where xxx.xxx.xxx.xxx are the IP’s that your server responds to.

So the the Full Option setion might look like this :

options {
directory “/var/named”;
allow-recursion { 127.0.0.1; xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx;};
};

Posted by: mahinctg | March 18, 2009

Qmail Queue Repair

Sometimes the Qmail Queue gets corrupted. As a result you might get the Same Mail Delivered more then once to Recipients and some other problems. In such cases the best solution is to Repair/Rebuild the Queue. For this I use a Script queue-repair-0.9.0. You can Find the script here queue_repair . Download it and rename it as queue_repair.py and make it executable. You need to follow some steps to Repair / Rebuild the queue. But remeber one thing, After you Repair the queue all mails will be lost which are currently in queue.

Now First you have to stop Qmail Process. Then Login to your Qmail Queue folder. In my Case it’s /var/qmail/queue/. Then just give ls -l command to see how many Direcroties are there in Different Queue Directories. The Output is something like this.

drwx——    2 qmails qmail 4096 Mar 18 11:18 bounce
drwx——  201 qmails qmail 4096 Mar 14 06:55 info
drwx——    2 qmailq qmail 4096 Mar 18 11:20 intd
drwx——  201 qmails qmail 4096 Mar 14 06:55 local

Looking at this Output we can see that there are 201 SubDir’s under the info dir. So it means Your conf-split value is 201-2 =199. You need this value to Repair your queue as the structure should be the same otherwise qmail will not work. What ever the Value you get from your ls -l output just subtract 2 from that and you will get the desired number. Then use this value like this

queue_repair.py -c -s 199 -n

It will rebuild your Queue. After successfull Repair restart the qmail process and inspect the logs to see everything is working or not. Hope this helps……

Older Posts »

Categories