Ubuntu-gutsy/hardy-Ethernet (nVidia MCP55 forcedeth) not working

This is a know issue in Ubuntu Linux ( gutsy , hardy ) with nVidia MCP55 Ethernet card.  This  card uses forecedeth module. forecedeth module  is loaded, network card seem to be up and running however it can not ping outside the box. Here is a quick fix for this problem, as a root [...]

Bash Script to create automatic FTP session and download file

This script automatically opens a FTP session and downloads file to local disk. Here is the scenario:
ftp: myftp.ext
username: myusername
password: mypassword
file to download: myfile.txt
1) Create bash script automatic_ftp_download.sh:
#!/bin/bash
# Script to create automatic FTP session and download file
ftp -n myftp.ext << end
us myusername mypassword
get myfile.txt
bye
end
2) make automatic_ftp_download.sh script executable:
chmod +x automatic_ftp_download.sh
3) run automatic_ftp_download.sh scrip:
./automatic_ftp_download.sh
4) find myfile.txt [...]

TCP port forwarding with linux iptables NAT, PREROUTING and DNAT example

Lets say that we would like to do port forwarding from our network interface eth0 on port 23  (telnet) to socket 10.0.0.1:23 (ip address:port):
iptables -t nat -I PREROUTING -p tcp -i eth0 –dport 111 -j DNAT –to 10.0.0.1:23
other example:
to do port forward from eth0 on port 456 to 192.168.0.1:788
iptables -t nat -I PREROUTING -p tcp [...]