Knowee
Questions
Features
Study Tools

Configure ufw so that it blocks all incoming traffic, except the following TCP ports:22 (SSH)443 (HTTPS SSL)80 (HTTP)

Question

Configure ufw so that it blocks all incoming traffic, except the following TCP ports:22 (SSH)443 (HTTPS SSL)80 (HTTP)

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here are the steps to configure UFW (Uncomplicated Firewall) to block all incoming traffic except for TCP ports 22 (SSH), 443 (HTTPS SSL), and 80 (HTTP):

  1. First, you need to open a terminal. You can do this by pressing Ctrl + Alt + T on your keyboard.

  2. Now, you need to install UFW if it's not already installed. You can do this by typing the following command and pressing Enter:

sudo apt install ufw
  1. Once UFW is installed, you can start configuring it. First, you should deny all incoming traffic. You can do this by typing the following command and pressing Enter:
sudo ufw default deny incoming
  1. Now, you need to allow traffic on the ports you specified. You can do this by typing the following commands and pressing Enter after each one:
sudo ufw allow 22/tcp
sudo ufw allow 443/tcp
sudo ufw allow 80/tcp
  1. Once you've configured UFW, you need to enable it. You can do this by typing the following command and pressing Enter:
sudo ufw enable
  1. Finally, you can check the status of UFW to make sure it's running and configured correctly. You can do this by typing the following command and pressing Enter:
sudo ufw status

You should see that UFW is active and that it's allowing traffic on the ports you specified, while denying all other incoming traffic.

This problem has been solved

Similar Questions

Let’s install the ufw firewall and setup a few rules on web-01.Requirements:The requirements below must be applied to web-01 (feel free to do it on lb-01 and web-02, but it won’t be checked)Configure ufw so that it blocks all incoming traffic, except the following TCP ports:22 (SSH)443 (HTTPS SSL)80 (HTTP)Share the ufw commands that you used in your answer file

1. Port forwarding#advancedFirewalls can not only filter requests, they can also forward them.Requirements:Configure web-01 so that its firewall redirects port 8080/TCP to port 80/TCP.Your answer file should be a copy of the ufw configuration file that you modified to make this happen

Question 9Your organization uses a Linux-based network, and you’re configuring Uncomplicated Firewall (ufw). You want to disable file transfers that use the File Transfer Protocol (FTP), which occurs on port 21. Which command can you use to block all traffic on this port?1 pointsudoufw reload 21sudoufw delete 21sudoufw allow 21sudoufw deny 21

You need to configure a firewall to allow only secure HTTPS traffic (port 443) to a web server while blocking all other incoming connections. Which level of the TCP/IP protocol stack should the firewall operate at?1.0 MarksNetwork Access Layer (NAL)Internet Protocol (IP)Network Interface Card (NIC)Application LayerTransport Layer

You need to configure a firewall rule that allows SSH access only from a specific IP address (192.168.1.100). What iptables rule(s) would you use?1.0 Marksiptables -A INPUT -p tcp --dport 22 -s 192.168.1.100 -j REJECTiptables -A INPUT -p tcp --dport 22 -s 192.168.1.100 -j ACCEPT

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.