Posts Tagged - install

Install Haraka SMTP Server On Ubuntu 20.04

sudo -i

Install NVM (Node Version Manager)

curl -o- | bash

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"

[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/"

Install Node (LTS)

nvm install --lts

Install Haraka

apt install build-essential

npm -g config set user root

npm install -g Haraka

cd /var/mail && haraka -i .

vim /var/mail/config/smtp.ini

; Server public IP

; Daemonize

; Spooling
; Save memory by spooling large messages to disk

haraka -c /var/mail

Allows incoming SMTP request on port 25 for server IP address x.x.x.x

iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d x.x.x.x --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp -s x.x.x.x --sport 25 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

Allow outgoing SMTP requst for server IP address x.x.x.

iptables -A OUTPUT -p tcp -s x.x.x.x --sport 1024:65535 -d 0/0 --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp -s 0/0 --sport 25 -d x.x.x.x --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

Read More

Compile and Install Linux Kernel on Ubuntu 20.04

sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison


tar xvf linux-5.7.10.tar.xz

cd linux-5.7.10

cp /boot/config-$(uname -r) .config

make menuconfig


sudo make modules_install

sudo make install

sudo update-initramfs -c -k 5.7.10

sudo update-grub

*) used for trying new kernel api from linux (io_uring).

Read More

Install Mongo DB CE on Ubuntu 20.04

Import the public key used by the package management system

  • sudo apt-get update && sudo apt-get install gnupg

  • wget -qO - | sudo apt-key add -

Add Mongo DB repository

  • echo "deb [ arch=amd64,arm64 ] bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list

Install Mongo DB

  • sudo apt-get update && sudo apt-get install -y mongodb-org

Start Mondo DB on Boot

  • sudo systemctl enable mongod.service

Read More

Install Docker CE on Ubuntu 20.04

Install Docker CE

  • apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

  • curl -fsSL | apt-key add -

  • echo "deb [arch=amd64] $(lsb_release -sc) stable" > /etc/apt/sources.list.d/docker-ce.list

  • apt update

  • apt install docker-ce

Enable Docker and Containerd to run on system boot

  • systemctl enable --now docker containerd

Running Docker as a non-root user

  • exit (Back to normal user)

  • sudo usermod -aG docker ${USER}

  • sudo chmod 666 /var/run/docker.sock


Read More

Install GNS3 on Ubuntu 20.04

Install GNS3

  1. sudo add-apt-repository ppa:gns3/ppa

  2. sudo apt update

  3. sudo apt install gns3-server gns3-gui

Install IOU Support (Optional)

IOU (IOS over Unix) is an internal Cisco tool for simulating the ASICs in Cisco Switches. This enables you to play with Layer 2 switching in your LABS.

  1. sudo dpkg --add-architecture i386
  2. sudo apt update
  3. sudo apt install gns3-iou

Add your user to the following groups:

for i in ubridge libvirt kvm wireshark; do
  sudo usermod -aG $i $USER


Read More

Create a bootable USB on Linux

Unmount and format USB drive (FAT32)

# umount /dev/sd[X|Y]

Creating new partition table on /dev/sdX

*) legacy msdos mbr pc

# parted --script /dev/sdX mklabel msdos

*) gpt guid

# parted --script /dev/sdX mklabel gpt

Write into USB drive

  • # dd bs=4M if=ubuntu-20.04-desktop-amd64.iso of=/dev/sdX status=progress oflag=sync


  • # shutdown -r 0

Read More