Posts Tagged - install

Install Haraka SMTP Server On Ubuntu 20.04

sudo -i

Install NVM (Node Version Manager)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

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

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

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
public_ip=x.x.x.x

; Daemonize
daemonize=true
daemon_log_file=/var/log/haraka.log
daemon_pid_file=/var/run/haraka.pid

; Spooling
; Save memory by spooling large messages to disk
spool_dir=/var/spool/haraka

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

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.10.tar.xz

tar xvf linux-5.7.10.tar.xz

cd linux-5.7.10

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

make menuconfig

make

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 - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

Add Mongo DB repository

  • echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu 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 https://download.docker.com/linux/ubuntu/gpg | apt-key add -

  • echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(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

Done

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
done

Done.

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

Reboot

  • # shutdown -r 0

Read More