Kick start Ubuntu

Just installed Ubuntu Server on my HP N54L Gen7 server.

Here is some essential things to perform.


First thing first, firewall is always the most concerns.

Login to the console directly, I mean directly, not through ssh/telnet.

# sudo ufw reset
# sudo ufw default deny incoming
# sudo ufw default allow outgoing
# sudo ufw allow proto tcp from to port 22
# sudo ufw allow proto tcp from to port 22
# sudo ufw alow 1194/udp

The rules above reset the firewall rule then add the rules below

  • Deny all incoming traffic
  • Allow all outgoing traffic
  • All SSH from and, assume server IP is
  • All incoming openvpn traffic running on port 1194 protocol udp

My N54L have the static IP of

To enable ufw

# sudo ufw enable

To review a list of active rules

# sudo ufw status

To enable the firewall rules after every reboot, edit the file


at the line below before the line ‘exit 0’

/lib/ufw/ufw-init start

This line MUST above ‘exit 0’

IP Masquerading

# sudo vi /etc/default/ufw


# sudo vi /etc/ufw/sysctl.conf

uncomment net/ipv4/ip_forward=1

#sudo vi /etc/ufw/before.rules

add the lines At THE END of the file, must below the line ‘COMMIT’

# nat Table rules

# Forward traffic from eth1 through eth0.

Restart firewall

# sudo ufw disable && sudo ufw enable

Leave a Reply

Your email address will not be published. Required fields are marked *