Flushing IPTables rule and allow all traffic for Debian or Ubuntu

Flushing all iptables chain rules shell script

#!/bin/sh
echo "Stopping IPv4 firewall and allowing everyone..."
ipt="/sbin/iptables"
## Failsafe - die if /sbin/iptables not found
[ ! -x "$ipt" ] && { echo "$0: \"${ipt}\" command not found."; exit 1; }
$ipt -P INPUT ACCEPT
$ipt -P FORWARD ACCEPT
$ipt -P OUTPUT ACCEPT
$ipt -F
$ipt -X
$ipt -t nat -F
$ipt -t nat -X
$ipt -t mangle -F
$ipt -t mangle -X
$ipt -t raw -F
$ipt -t raw -X

Make sure you can execute the script using the chmod command: Continue reading “Flushing IPTables rule and allow all traffic for Debian or Ubuntu” »

Share

Install and Setup ZFS on Debian 11

The full form of ZFS is Zettabyte File System. The ZFS filesystem is a 128-bit filesystem. The ZFS supported filesystem size is 3×10(to the poer 24) TB. You may never encounter such a big filesystem in real life. The ZFS filesystem was designed to keep and access an insane amount of data.

Enabling Debian contrib Package Repository:

The ZFS filesystem packages are available in the official Debian 11 contrib package repository. The contrib package repository is not enabled on Debian 11 by default. But you can easily enable it from the command-line.

To enable the contrib package repository, open a Terminal and run the following command:

$ sudo apt-add-repository contrib

The official Debian contrib repository should be enabled.

$ sudo apt-get update

Installing ZFS Filesystem Dependencies:

You must install the libraries that the ZFS filesystem kernel module depends on before installing the ZFS filesystem on Debian 11. Continue reading “Install and Setup ZFS on Debian 11” »

Share

Pushing Docker Images to a Docker Repository

The next logical step after creating a new image from an existing image is to share it with a select few of your friends, the whole world on Docker Hub, or other Docker registry that you have access to. To push an image to Docker Hub or any other Docker registry, you must have an account there.

This section shows you how to push a Docker image to Docker Hub. To learn how to create your own private Docker registry, check out How To Set Up a Private Docker Registry on Ubuntu 14.04.

To push your image, first log into Docker Hub.

docker login -u docker-registry-username

You’ll be prompted to authenticate using your Docker Hub password. If you specified the correct password, authentication should succeed. Continue reading “Pushing Docker Images to a Docker Repository” »

Share

Docker Commands

Working with Docker Images

Docker containers are built from Docker images. By default, Docker pulls these images from Docker Hub, a Docker registry managed by Docker, the company behind the Docker project. Anyone can host their Docker images on Docker Hub, so most applications and Linux distributions you’ll need will have images hosted there.

To check whether you can access and download images from Docker Hub, type:

docker run hello-world

The output will indicate that Docker in working correctly:

Output
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
...

Docker was initially unable to find the hello-world image locally, so it downloaded the image from Docker Hub, which is the default repository. Once the image downloaded, Docker created a container from the image and the application within the container executed, displaying the message. You can search for images available on Docker Hub by using the docker command with the search subcommand. For example, to search for the Ubuntu image, type: Continue reading “Docker Commands” »

Share

Install Docker on Debain 10

Installing Docker

The Docker installation package available in the official Debian repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package.

First, update your existing list of packages:

sudo apt update

Next, install a few prerequisite packages which let apt use packages over HTTPS:

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Then add the GPG key for the official Docker repository to your system: Continue reading “Install Docker on Debain 10” »

Share

Installing wkhtmltopdf on Debian 7.8

Installing wkhtmltopdf on Debian 7.8 to dynamically create PDF documents from HTML.

apt-get update
aptitude install xfonts-base xfonts-75dpi fontconfig
mkdir ~/src/wkhtmltopdf -p
cd ~/src/wkhtmltopdf
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.2.1/wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb
dpkg -i wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb

Src:
https://fedir.github.io/web/blog/2015/09/01/install-wkhtmltopdf-on-debian-7.8
https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.2.1/
https://github.com/wkhtmltopdf/packaging/releases/0.12.6-1
https://stackoverflow.com/questions/38262173/how-to-correctly-install-wkhtmltopdf-on-debian-64-bit

Share

Easyengine installaiton on Debian 10

Install Easyengine WordPress on a Debian 10 VM (mine was a KVM).

The following procedure will install EE with following components;

  • Docker
  • WordPress Core
  • MariaDB
  • Nginx Server PHP-FPM
  • Redis Cache
  • Let’s encrypt SSL

Install EasyEngine on Linux

wget -qO ee rt.cx/ee4 && sudo bash ee
ee site create your_domain --type=wp --ssl=le --cache

For detailed installation or customizing your requirement, you may visit- https://easyengine.io/commands/site/create/ Continue reading “Easyengine installaiton on Debian 10” »

Share

Ubuntu Firewall – UFW useful commands

Prerequisites

To follow this tutorial, you will need one Debian 10 server with a sudo non-root user, which you can set up by following Steps 1-3 in the Initial Server Setup with Debian 10 tutorial.

Step 1 – Installing UFW

Debian does not install UFW by default. If you followed the entire Initial Server Setup tutorial, you will have installed and enabled UFW. If not, install it now using apt:

sudo apt install ufw

We will set up UFW and enable it in the following steps.

Step 2 — Using IPv6 with UFW (Optional)

This tutorial is written with IPv4 in mind, but will work for IPv6 as long as you enable it. If your Debian server has IPv6 enabled, you will want to ensure that UFW is configured to support IPv6; this will ensure that UFW will manage firewall rules for IPv6 in addition to IPv4. To configure this, open the UFW configuration file /etc/default/ufw with nano or your favorite editor:

sudo nano /etc/default/ufw

Then make sure the value of IPV6 is yes. It should look like this:

/etc/default/ufw excerpt
IPV6=yes

Continue reading “Ubuntu Firewall – UFW useful commands” »

Share