From 09d25d75fa01b4ffcc08b219b937e004544a59ed Mon Sep 17 00:00:00 2001 From: Samuel Hunter Date: Wed, 30 Jun 2021 21:34:48 -0700 Subject: Restrict assumptions to post-Vultr tutorial All references to `sudo` are removed, and details how to log into the remtoe shell are more-or-less copied form the webserver tutorial. --- ufw.html | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'ufw.html') diff --git a/ufw.html b/ufw.html index 7f80f08..85cd439 100644 --- a/ufw.html +++ b/ufw.html @@ -14,34 +14,38 @@

Uncomplicated Firewall (UFW) is a front-facing program for the more involved iptables firewall program installed in most GNU/Linux distributions. - If you're reading this, I assume you know the basic steps on how to use a Linux shell and how to install software for your server. - Otherwise, I recommend following Setting Up a Web Server. + We can use ufw to restrict machines on the internet to only access the services (SSH, websites etc) you want them to, but it can also be used to prevent programs on the computer itself from accesing parts of the internet it shouldn't. +

+ +

+ If you're reading this, I'll assume you have set up a server on Vultr.

How to Get It

+

Log into your server by pulling up a terminal and typing:

+ +
ssh root@yourdomain.com
+

- If you followed the basic setup course, then you know that Vultr already installed ufw for you. - If you don't use Vultr, then you can install it on a Debian system by running in a remote shell: + This command will attempt to log into your server and run a remote shell. + If you leave the settings default, it should prompt you for your password, and you can just copy or type in the password from Vultr's site. + If you did not set up your DNS yet, replace yourdomain.com with the IP address that Vultr gives you.

-
sudo apt-get update && sudo apt-get install ufw
-

- The first command checks to see what packages can be installed, and the second command installs ufw. - It's strung together by a && to run the second command as long as the first succeeded. + If you followed setting up your webserver, then you know that Vultr already installed ufw for you. + If you don't use Vultr, then you can install it on a Debian system by running in your remote shell:

-

First-Time Setup

+
apt-get update && apt-get install ufw

- ufw is an administration program, so you will need root access to use it. - To make sure you don't have to keep typing sudo in all your commands, you can login to the root user by running: + The first command checks to see what packages can be installed, and the second command installs ufw. + It's strung together by a && to run the second command as long as the first succeeded.

-
sudo su -
- -

I'll assume you're in a root account from now on, but otherwise, remember to prepend all ufw commands with sudo.

+

First-Time Setup

You can check the status of ufw right now by running:

-- cgit v1.2.3