Port Proxy in iptables – Forwarding port to another host

Here is the commands, for example you want to forward port 8080 to another host 192.168.100.2:8080

preparation, enable ip forward
sysctl net.ipv4.ip_forward=1

first we need to masquerade the packet
iptables -t nat -I POSTROUTING -p tcp -j MASQUERADE

Second, change the destination to another host
iptables -t nat -I PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.100.2:8080

Or, listen on specific ip
iptables -t nat -I PREROUTING -p tcp -d 192.168.100.1 --dport 8080 -j DNAT --to-destination 192.168.100.2:8080

This last is optional, you may need it if your FORWARD chain default REJECT
iptables -I FORWARD -d 192.168.100.2 -p tcp --dport 8080 -j ACCEPT

Note:
* iptables rules is not persistent, you can make it persistent using iptables-persistent
* you can also use ufw rules, save in the file /etc/ufw/before.rules

Source: https://askubuntu.com/questions/320121/simple-port-forwarding

Using Linux screen in Ubuntu

Screen is useful when updating system, usually takes long time, whenever accidentally disconnected, you can reconnect again.

Install
apt-get install screen

Start screen
$screen

Reattach
$screen -r

Control command
ctrl-a

Next Screen
ctrl-a n

Prev Screen
ctrl-a p

Detach Screen
ctrl-a d

New Screen
ctrl-a c

Quit
ctrl-a \

Help keys
ctrl-a ?

Source: http://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/