Debian 7.6 X86_64 Basic Config

by zzy809
14 deployments · 8 still active · last rev. 3 years ago

This script follows the official Getting Started Guide on:

- Install Software Updates
- Set the Hostname
- Update /etc/hosts(FQDN)
Optional setup, please do the following manually if you want
- Set the Timezone(graphic)
----command line: dpkg-reconfigure tzdata

- Check time(Optional)
----command line: date

- Add new user and Disable root login (

- Create a Firewall (

- Install and Configuring Fail2Ban (may be out of date)

Compatible with: Debian 7
#<UDF name="hostname" label="The hostname for the new Linode.">
#<UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name">

# This sets the variable $IPADDR to the IP address the new Linode receives. 
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')
# This updates the packages on the system from the distribution repositories. 
apt-get update 
apt-get upgrade -y
# This section sets the hostname. 
echo $HOSTNAME > /etc/hostname 
hostname -F /etc/hostname
# This section sets the Fully Qualified Domain Name (FQDN) in the hosts file. 
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts