Archive for August, 2009

15th August
2009
written by Chris

There are times when you may need to migrate many IP addresses in Plesk. You could either do this by hand, one domain at a time or you can modify the database by hand which will save countless years of your life.

I will assume you have logged into mysql and have selected the psa database. After logging in, get a listing of IP addresses. Make sure that you have read the new IP addresses into Plesk by first logging into the control panel and performing a "Reread IP".

mysql> SELECT * FROM IP_Addresses;

You will see a list of id numbers in the first column followed by the addresses in the second column. Perform the modification of the component_id table.

mysql> UPDATE Repository SET component_id = <new id> WHERE component_id = <old id>;

Then update the hosting table.

mysql> UPDATE hosting SET ip_address_id = <new id> WHERE ip_address_id = <old id>;

Finally, update the forwarding table if necessary.

mysql> UPDATE forwarding SET ip_address_id = <new id> WHERE ip_address_id = <old id>;

Once this is done, check the IP section in Plesk and everything should be moved.

Tags: ,
14th August
2009
written by Chris

Some of you may be aware that along with my tech job I am also a deputy sheriff. A couple of years ago we were looking at replacing our records management system because it had some serious flaws. Among them was that it could not work between our two offices because it had no client/server architecture. It also had a data integrity problem in which one deputy's report could be overwritten by another person using the system.

Looking around, we found that we were not able to purchase the multi-thousand dollar packages that were out there. Being a small county, we didn't have the budget for that. Since I had previous experience putting together an application that the service provider I worked for used for day-to-day operations I thought could put something together.

What came of that is now a fully featured records management system that also includes activity logs and callsheets for dispatch to use. I won't go into all the details but I wanted to post a couple of screenshots.

If you would like an inexpensive but fully functional records management system, I will be glad to talk to you with more details. This package is written by an active law enforcement officer and is setup to be simple to use and include things that are needed without all the extras that aren't needed.

06th August
2009
written by Chris

There is a method to bypass RBL checking for certain addresses and domains in Postfix. This assumes that you are using RBL checking in the first place.

First, create an rbl_override file in /etc/postfix.

vi /etc/postfix/rbl_override

Place the domains and/or IP addresses you would like whitelisted into that file.

192.168.0.1
192.168.0.2
domain.com
subdomain.example.com

Create the hash of that file.

postmap /etc/postfix/rbl_override

Edit the main.cf file.

vi /etc/postfix/main.cf

Locate the section marked smpt_recipient_restrictions. You need to add the following to that.

check_client_access hash:/etc/postfix/rbl_override

Restart Postfix and you should be all set.

/etc/init.d/postfix restart
06th August
2009
written by Chris

You can access ports on a remote server and map them to a port on your local computer with an SSH tunnel. I do this with the command:

ssh -N -L localport:127.0.0.1:remote_port user@remote_host
Tags: ,