Dynamic Round Robbin DNS (DDNS with round robin support)

We have just developed an application in-house for Dynamic DNS with round robin (for our own “validation through IP” purposes) that functions as a dynamic DNS with round robin features.

We could make this application public if it gets enough attention and is of use to many people.

The application is fully functional at the minute, but if it gets attention, we can improve the user interface, and make it public.

The Dynamic DNS with round robin support takes into account that connections that have not contacted for update should be removed from the round robin record.

* Username and password verification
* modifiable ttl in sync with frequency of IP checks
* Almost infinatly Scalable system.
* PHP client, easy to create any other client. PHP update script can run as cron job.
* remove frm list when no update requests is received for a user set amount of time, return to list once an update request is sent again
* Super fast
* For multi homed links, the password per hostname (not per zone) eliminates the risk of an update request through a different eithernet adapter that is the main link of another machine.
* Security through MD5 sums that change with the IP change (Your passwords are never transmitted during an update)
* if 2 machines are using the same IP address, the anti_duplicate_valuesarray will limit the round robin records to that value only once.
* the dead record currently only dissapear when a different IP changes, 2DO: change must reflect when another updates !

mysqldump by example

MySQL Dump is probably one of the best tool to take copies of databases, and it comes with MySQL, so you don’t need to install more stuff.

Example 1: Backup all databases (Use with caution, see below)
IMPORTANT: if you dump this to another server, you will lose all users on the target server, this is because the database named mysql (not the database engine but the actual database that has the users) on the target server is overwritten by the one from the source

1- Dump all databases

mysqldump -u root --password="thispassword" --all-databases > thisdatabasedump.sql

2- Dump all databases and gzip compress the output file, gzcompress is like compression used in zip files, this command compresses on the fly (make sure gzip is installed)

mysqldump --opt -u root --password="thispassword" --all-databases | gzip -9 > thisdatabasedump.sql.gz

3- Dump all databases and BZIP compress the output file, BZIP compression is better than gzip compression, but takes significantly more time, like the one before this command compresses on the fly (make sure you have bzip2 installed)

mysqldump --opt -u root --password="thispassword" --all-databases | bzip2 > thisdatabasedump.sql.bz2

4- If you have a server with multiple processors, you can overcome the slowness of bzip2 by simply making all the CPUs (real or virtual or hyper threaded) work on compressing at the same time, the application is called parallel bzip2 (make sure pbzip2 is installed)

mysqldump --opt -u root --password="thispassword" --all-databases | pbzip2 > thisdatabasedump.sql.bz2

4.5- If your server has 8CPUs and you only want 7 of them to do zipping so that one of them can be dedicated to mysqldump

mysqldump --opt -u root --password="thispassword" --all-databases | pbzip2 -p7 > thisdatabasedump.sql.bz2

I will not give any more examples about compression, obviously, as you can see from the examples above, to compress on the fly all you need to do is replace the section ( > thisdumpfile.sql ) with ( | pbzip2 > thisdumpfile.sql.bz2 )

5- Dump a certain database to the file

mysqldump --opt -u root --password="thispassword" thisparticulardbsname > thisdumpfile.sql

6- Dump certain databaseS

mysqldump --opt -u root --password="thispassword" --databases db1name db2name db3name db4name > thisdumpfile.sql

7- Dump certain tables from within a database

mysqldump --opt -u root --password="thispassword" databasename table1name table2name table3name > thisdumpfile.sql


Disable Windows has detected a hard disk problem message in windows

The following are the steps to disable the error message associated with a bad hard drive, the message that windows will display after every login, we will disable it from within windows without disabling it in the BIOS.

The message above reads (On my computer, on yours, the disk model number and the names of the volumes will probably be different.

Windows has detected a hard disk problem.
Back up your files immediately to prevent information loss, and then contact the computer manufacturer to determine if you need to repair or replace the disk

Then, you are presented with the following two options

Start the backup process

Ask me again later
-- If the disk fails before the next warning, you could lose all of the programs and documents on the disk.

In the show details dialogue you should see 

Immediate steps
Because disk failure will cause you to loose all programs, files and documents on the disk, you should back up your important information immediately, try not to use your computer until you have repaired or replaced the hard disk.
Which disk is failing
The following hard disks are reporting failure.
Disk name: TOSHIBA MK3264GSXN ATA Device
Volume: C:\, D:\, E:\ 

My advice would be

Do not disable S.M.A.R.T. from BIOS, rather, ask windows not to display this message, this is because for a failing disk, you would want the S.M.A.R.T. data accessible from other programs or to keep an eye on it.

To disable this error message from within windows, do the following

click the start button and enter the word “task” in the search box, Task Scheduler should appear, right click it and chose run as administrator.
Once it is open, follow the tree to your left as follows
“Task Scheduler Library” => “Microsoft” => “Windows”. => “DiskDiagnostic”

As shown in the image, select the second entry, right click it, then click disable.

The following is the dialogue

close, and restart your computer to check if it worked.

The Linux DD command

To detect the progress or how far dd has come in a running copy, open a second terminal window, run top to get the id of the dd process, then issue the command kill -USR1 xxxx (replace xxx with the actual ID of the process), now it may appear that nothing happened, but swicth the terminal to the one dd is running in

you should see something like

1036902161+0 records in
1036902160+0 records out
530893905920 bytes (531 GB) copied, 29702.1 s, 17.9 MB/s

Recovering files from ext4 partition

Update, although extundelete restrored most of my files, some files could only be restored with no file name through an application that is installed with testdisk called photorec

So, i added a directory to eclypse, a message apears, i hit enter axcidentally, all the files in the web directory are lost, no backup, years of programming…

Instantly, i shut down the computer so that i do not overwrite the disk space with new files and logs and the like, i got a larger disk (1.5tb) and did the DD first (i recommend gddrescue in place of DD just in case your disk has bad sectors).

Installed Linux (Debian 7) on the new disk, installed the hard drive from the other computer to the new PC, then installed the software i always use to recover files, testdisk, test disk did not work as expected, on both disks, when it comes to the ext4 partition, the process that ended in an error would be as follows

create log file
Chose the 1TB disk (the one with the deleted files
Partition type (INTEL)
Chose the main partition *(ext4) and chose List (left and right arrow keys)
Damn, the error.

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>


 1 * Linux                    0  32 33 119515  60 33 1920010240
Can't open filesystem. Filesystem seems damaged.

So, i quit TestDisk and installed
apt-get install extundelete

extundelete /dev/sdb1 --restore-directory /var/www

This way, i only restore the files from that direcotry, if you want all the deleted files, you could surely use something like

extundelete /dev/sda4 --restore-all

Anyway, my files are back, a few are missing, but i am sure i can deal with that

MySQL – Can’t change ownership of the file Errcode: 1

When trying to repair tables (or optimise), there seems to be an error that is giving me a hard time.

The SQL statement REPAIR TABLE mytablename; returns the following

| Table               | Op     | Msg_type | Msg_text                                                                                     |
| mydbase.mytablename | repair | error    | 1 when fixing table                                                                          |
| mydbase.mytablename | repair | Error    | Can't change ownership of the file '/hds/wd1tb_2/mysql/mydbase/mytablename.MYD' (Errcode: 1) |
| mydbase.mytablename | repair | status   | Operation failed                                                                             |

So, the only solution up to now is to

chmod -R 700 /hds/wd1tb_2/mysql/
chown -R mysql:mysql /hds/wd1tb_2/mysql/

This error has already been reported as a big long time ago, but it seems to be still there, this is the only way around the situation, and it does not seem to have been resolved with MySQL 5.5.33-0+wheezy1

Quickly disable and enable autoplay and autorun

Disable auto run and auto play.

1- Download : the first to disables windows auto play (to protect your computer), the other enables it if you ever change your mind.
Download Disable Auto Play
Download Enable Auto Play

2- Run the file you downloaded
3- Restart your computer

Why diable autorun / autoplay ?

i disable it because i don’t like auto run viruses that my antivirus don’t catches ! maybe you have your reasons, like you don’t like the thing that pops up when you insert a flash stick or a DVD.

What is the difference between autorun and autoplay ?

AutoPlay is the new AutoRun (Windows vista and above)

Auto Run : the original from windows 95, the system executes the program mentioned in autorun.inf when removable media is inserted.

Auto Play : Like auto run, but when and if there is no autorun.inf file, the OS will try to guess and give you choices.

All you need to disable it, is to download the following from above, and run the one named disable-autoplay.reg, if you want to re-enable it for some reason, run the file that says enable-autoplay.reg

What happens when i run the files above ?

Rather than asking you to use regedit to edit your registry and change values or add them, we made a reg file with the values for you to download and use, what you are downloading is a text file (and not a program) that will instruct your computer on the new registry values.

The values that are modified (or added if the key does not exist) are

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ ENTRY NoDriveTypeAutoRun
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\ ENTRY NoDriveTypeAutoRun

The disable file will set the values above to 000000FF (Decimal 255) to disable auto play (autorun), and the enable file above will set auto play (autorun) to 00000001 (Decimal 1).

Windows provides a tool to do it too, you can do this using gpedit.msc.
Hit start, type gpedit.msc then when that appears in the list, hit enter.
Computer Configuration >> Administrative Templates >> Windows Components >> AutoPlay Policies

That will open a new window that will allow you to enable or disable autorun.

Or you could just click one of the files above and run it on your computer.

workaround to promo code do not work for GoDaddy SSL

So it seems there are no working promo codes available for godaddy. i am not coming to this as a conclusion, i actually made an affiliate account and went in to take a look at the available promo codes. Nothing for SSL that can take you under $28.

the best deal i found was 32% off which is still not cheap

So, the solution for me was to get the SSL certificate from a godaddy reseller for $29. i got mine through this link… while godaddy puts up new promo codes for SSL


Happy savings