cli Archives - Bitbandits blog https://www.bitbandit.net/tag/cli/ Just another tech blog. Thu, 22 Jun 2023 16:40:42 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.6 Using Firewalld To Secure Your Server https://www.bitbandit.net/2019/10/using-firewalld-to-secure-your-server/ Mon, 21 Oct 2019 19:03:25 +0000 https://www.bitbandit.net/?p=45 Firewalld is a nice interface to manage iptables or nftables rules on your CentOS systems. We will go over how to open port 80/HTTP and 443/HTTPS on our host firewall to allow access to our website running on our system. It is important to have a firewall on your system so you can control access … Continue reading "Using Firewalld To Secure Your Server"

The post Using Firewalld To Secure Your Server appeared first on Bitbandits blog.

]]>
Firewalld is a nice interface to manage iptables or nftables rules on your CentOS systems. We will go over how to open port 80/HTTP and 443/HTTPS on our host firewall to allow access to our website running on our system. It is important to have a firewall on your system so you can control access to the services running on your system.

Opening ports

To open port 80/HTTP and 443/HTTPS we will want to run the following commands.

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

The output from each of the command above should say “success”.

We can check to make sure the rules are in place by running the following command.

firewall-cmd --list-all
output of firewall-cmd --list-all

Checking the status

To check the status of the firewalld service you can run the following command.

systemctl status firewalld
output of systemctl status firewalld

Enabling or Disabling

To enable firewalld you would run the following command

systemctl enable firewalld
output of systemctl enable firewalld

To disable firewalld you would run the following command.

systemctl disable firewalld
output of systemctl disable firewalld

The post Using Firewalld To Secure Your Server appeared first on Bitbandits blog.

]]>
Downloading files via command line https://www.bitbandit.net/2019/10/downloading-files-via-command-line/ Wed, 02 Oct 2019 19:11:01 +0000 https://www.bitbandit.net/?p=30 Here are a couple commands you can use to download files on your Linux system. These are handy when you are wanting to grab some files while working on the command line. Using wget Using curl These commands will download the file you specify and save them to your current working directory.

The post Downloading files via command line appeared first on Bitbandits blog.

]]>
Here are a couple commands you can use to download files on your Linux system. These are handy when you are wanting to grab some files while working on the command line.

Using wget

$ wget https://www.bitbandit.net/testfile.txt

Using curl

$ curl -o testfile.txt https://www.bitbandit.net/testfile.txt

These commands will download the file you specify and save them to your current working directory.

The post Downloading files via command line appeared first on Bitbandits blog.

]]>