2009-10-12

postgreSQL crash course

As I was searching for a INNER JOIN problem in postgreSQL, I ran across this must awsome guide. With examples and all. Easy to overview. Starting from a very basic level, increasing to very in depth knowledge of postgres inner workings.

http://www.commandprompt.com/ppbook/x5802

Hashes: #postgreSQL #database #postgre #SQL

Port Forwarding in Ubuntu with iptables

Assuming your ubuntu box already have NAT up and running, and you wish to connect directly to the internet from a machine behind your Router (Ubuntu, GNU/Linux-box).

iptables -A PREROUTING -t nat -i ##incomming interface## -p tcp --dport ##incomming port## -j DNAT --to ##destination IP##:##destination port##

For example:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 8080 -j DNAT --to 10.1.249.250:80

When I wanted to access a web server behind my Ubuntu NAT-router in my home. Now I can surf to #mydomain#:8080 to access that internal web server at port 80.

Hashes: #linux #ubuntu #nat #port forwarding #iptables