Question

Add an iptables rule to block connections to the web server. Enter the iptables commands you...

Add an iptables rule to block connections to the web server. Enter the iptables commands you used to add this rule to your firewall and explain it. (Kali Linux or CentOS)

Homework Answers

Answer #1

To block a specific service like a web server using iptables, we need to specify a rule for dropping all packets coming to that port.

A web server uses port 80 for HTTP. On CentOS, to block connections to the web server, we can define a INPUT iptable rule like below:

sudo iptables -A INPUT -p tcp --dport 80 -j DROP

To make this change permanent (survive iptables service restart or a system reboot), additionally run:

sudo iptables-save > /etc/sysconfig/iptables

This will block all incoming traffic to the web server (assuming its only serving as HTTP, for HTTPS we've to define an additional rule with port 443).

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Web Server is the computer that stores Web Server Software and Website. If you are running...
Web Server is the computer that stores Web Server Software and Website. If you are running some service like Food Panda which type of Hosting Server will be used. Answer your question by discussion and comparison of different types of web hosting? If you have low budget so what will be the best possible hosting plan in this situation? Justify your answer by logical reasoning.
When configuring a web server, you notice the following Cipher Suites are available to use for...
When configuring a web server, you notice the following Cipher Suites are available to use for TLS-based connections: • Cipher Suite 1: TLS_ECDHE_RSA_AES_128_CBC_SHA256 • Cipher Suite 2: TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA Answer the following questions regarding these two cipher suites. i. What is the key exchange (Kx) algorithm in Cipher Suite 2? ii. What is the authentication (Au) algorithm in Cipher Suite 1? iii. What is the key size of the symmetric cipher in Cipher Suite 1? iv. What is the effective key...
Lab of operating system: please use the linux server please so all the commands used and...
Lab of operating system: please use the linux server please so all the commands used and the output PROBLEM 1: Create a file and name it f1 • Cerate a directory and name it d1 • Move f1 to d1 • Create a directory and name it d2 • Move d1 to d2 • Check if d1 is inside d2 • Check if f1 is inside d1 • While your (Current Working Directory) CWD is d1, move back f1 to...
List a sequence of Linux commands you would execute after you successfully log on to your...
List a sequence of Linux commands you would execute after you successfully log on to your VM machine, make a directory called midterm in your home directory, create a simple C program called display.c in the newly created directory, compile the code using gcc compiler, and run the program, and finally, save the output to a text file called display.txt. Remember to briefly explain each command.
A recent penetration test revealed several issues with a public-facing website used by customers. The testers...
A recent penetration test revealed several issues with a public-facing website used by customers. The testers were able to: Enter long lines of code and special characters Crash the system Gain unauthorized access to the internal application server Map the internal network The development team has stated they will need to rewrite a significant portion of the code used, and it will take more than a year to deliver the finished product. Which of the following would be the BEST...
You are a research engineer on ICT technologies and have embarked on a web design project...
You are a research engineer on ICT technologies and have embarked on a web design project for Sydney Olympics Committee. The committee would like you to include accessibility features built into this website. The website will be used for finding information about Olympics in Australia and also book tickets for various Olympic events. 1. Explain what web accessibility guidelines you will be using in designing the websites and how will you embrace the ‘design for all’ approach. Use suitable examples  ...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following commands do: dd, y3, p, :set cindent (1 pt) VIM exercises These exercises on the computer need to be repeated by each student in the pair. This is to ensure that both students understand how to get around in Linux!!! For this part of the lab, you will create a .vimrc file that will help you develop your C++ programs using VIM. First, we...
Enter the hypothetical data below in SPSS to use for the assignment. The SPSS commands: 'file',...
Enter the hypothetical data below in SPSS to use for the assignment. The SPSS commands: 'file', 'new', 'data' will create a spreadsheet in which to enter the data below (manually). Case      Group                   Test 1              1                              6 2              1                              7 3              1                              5              4              1                              4 5              1                              1 6              2                              3 7              2                              5 8              2                              2 9              2                              5 10           2                                1 The groups are coded as follows: 1=experimental group, 2 control group. The participants in the experimental...
Overview Your assignment is to complete a wireless network design for a small company. You will...
Overview Your assignment is to complete a wireless network design for a small company. You will place a number of network elements on the diagram and label them appropriately. A network diagram is important to communicate the design features of a network between network administrators, system administrators and cyber-security analysts. It helps to create a shared mental model between these different technologists, yet each will have their own perspective on what is important to have documented on the diagram. Please...
You are an employee of Atabanana Corporation. You just used your badge to enter a restricted...
You are an employee of Atabanana Corporation. You just used your badge to enter a restricted area. Behind you is another person you do not know who catches the door and walks in. What fraud technique is being used here? If you suspect that this person is not authorized to be in this area, what should you do? In a few sentences, please explain your answer.