Browsing articles tagged with " linux"

Migrating (transferring) data from MySQL to PostgreSQL

I was working on rails project and I faced this problem, my development environment DB is MySQL while production environment DB is PostgreSQL, and I wanted to move some data. I found the following 2 ways :
Continue reading »

Blocking all incoming requests except specific IP using iptables

If you are using linux and wants to block all incoming requests to a specific port except a specific IP (your static IP or localhost in my example) , You should first block all incoming requests to this PORT using the following command :

~  iptables -A INPUT -p tcp --dport PORT_NUMBER -j DROP

Then, Allow this specific IP using the following command :

~  iptables -A INPUT -p tcp -s THE_IP_YOU_WANT_TO_ALLOW --dport PORT_NUMBER -j ACCEPT