Explore the functionalities of iptables

Assignment Help Computer Network Security
Reference no: EM133015791

BN324 Enterprise Cyber Security and Management

Packet Filtering Firewalls (IPTABLES)

Description:

This manual is for running experiments on IPTABLES firewall. In this lab you will set up a Linux-based system as a firewall, according to a network security policy provided to you. The implementation will be done using an Oracle Virtual Box.
• In the first experiment, you will use IPTABLES firewall on a Kali in order to be familiar with IPTABLES firewalls. Students will also explore the functionalities of iptables, the Linux firewall
• In the second experiment, students will perform some basic commands, followed by some exercises.

Pre-work:
1. Launch Virtual Box
2. Launch your Kali
3. Do all your exercises in the VM

Exercises 1: You are required to read, install, set up, configure, and test your iptables firewall

The goal of this exercise is to explore the functionalities of iptables, the Linux firewall, in a simple network setting. To facilitate the deployment of the network setting out of the laboratory, we will use only Kali virtual machines for implementing it.

IPTABLES is a command line utility for configuring Linux kernel firewall implemented within the Netfilter project. The term iptables is also commonly used to refer to this kernel-level firewall. Iptables is a Linux command line firewall that allows system administrators to manage incoming and outgoing traffic via a set of configurable table rules.
Iptables uses a set of tables which have chains that contain set of built-in or user defined rules. Thanks to them a system administrator can properly filter the network traffic of his system.
Per iptables manual, there are currently 3 types of tables:
1. FILTER - this is the default table, which contains the built in chains for:
1. INPUT - packages destined for local sockets
2. FORWARD - packets routed through the system
3. OUTPUT - packets generated locally

1. Install iptables (if not installed already).
Sudo apt-get install iptables

2. Access to the iptables manual page
Man iptables
3. If you want to check your existing rules, use the following command
Sudo iptables -L -n -v

Exercises 2: Explore the functionalities of iptables, the Linux firewall and write some rules
1. Block Specific IP Address in IPtables Firewall

Where you need to change "xxx.xxx.xxx.xxx" with the actual IP address. Be very careful when running this command as you can accidentally block your own IP address. The -A option appends the rule in the end of the selected chain.
In case you only want to block TCP traffic from that IP address, you can use the -p option that specifies the protocol. That way the command will look like this:

2. Unblock IP Address in IPtables Firewall

If you have decided that you no longer want to block requests from specific IP address, you can delete the blocking rule with the following command:

The -D option deletes one or more rules from the selected chain. If you prefer to use the longer option you can use --delete.

3. Block Specific Port on IPtables Firewall
Sometimes you may want to block incoming or outgoing connections on a specific port. It's a good security measure and you should really think on that matter when setting up your firewall.
To block outgoing connections on a specific port use

To allow incoming connections use:

In both examples change "xxx" with the actual port you wish to allow. If you want to block UDP traffic instead of TCP, simply change "tcp" with "udp" in the above iptables rule.
4. Allow Multiple Ports on IPtables using Multiport
You can allow multiple ports at once, by using multiport, below you can find such rule for both incoming and outgoing connections:

5. Block Facebook on IPtables Firewall

First find the IP addresses used by Facebook

You can then block that Facebook network with:

Keep in mind that the IP address range used by Facebook may vary in your country.
6. Block Network Flood on Apache Port with IPtables

The above command limits the incoming connections from per minute to 100 and sets a limit burst to 200. You can edit the limit and limit-burst to your own specific requirements

7. Block Incoming Ping Requests on IPtables

Some system administrators like to block incoming ping requests due to security concerns. While the threat is not that big, it's good to know how to block such request:

8. Allow loopback Access

Loopback access (access from 127.0.0.1) is important and you should always leave it active:

9. Keep a Log of Dropped Network Packets on IPtables
If you want to log the dropped packets on network interface eth0, you can use the following command:

10. Block Access to Specific MAC Address on IPtables

You can block access to your system from specific MAC address by using:

Of course, you will need to change "00:00:00:00:00:00" with the actual MAC address that you want to block

11. Limit the Number of Concurrent Connections per IP Address
If you don't want to have too many concurrent connection established from single IP address on given port you can use the command below:

The above command allows no more than 3 connections per client. Of course, you can change the port number to match different service. Also the --connlimit-above should be changed to match your requirement.

12. Search within IPtables Rule
Once you have defined your iptables rules, you will want to search from time to time and may need to alter them. An easy way to search within your rules is to use:

In the above example, you will need to change $table with the actual table within which you wish to search and $string with the actual string for which you are looking for.
Here is an example:

13. Flush IPtables Firewall Chains or Rules
If you want to flush your firewall chains, you can use

You can flush chains from specific table with

You can change "nat" with the actual table which chains you wish to flush.

14. Disable Outgoing Mails through IPTables
If your system should not be sending any emails, you can block outgoing ports on SMTP ports. For example you can use this

Attachment:- Packet Filtering Firewalls.rar

Reference no: EM133015791

Questions Cloud

Tax levied on smokeable forms of cannabis : Consider this statement. Government should implement a policy that sees the tax levied on smokeable forms of cannabis be priced higher/taxed heavier than edible
How many breaches that were made public pertain : Create a search based on criteria that you are interested in, such as the Payment Card Fraud against Retail/Merchants during the current year
What is the deferred tax item that is recognised : A subsidiary sold inventories to its parent for $100 000. The company tax rate is 30%. What is the deferred tax item that is recognised on consolidation
Prepare the corrected unadjusted trial balance at June : The balance of Advertising Expense is $600, but it was listed as $400 on the trial balance. Prepare the corrected unadjusted trial balance at June
Explore the functionalities of iptables : Explore the functionalities of iptables, the Linux firewall and write some rules - Explore the functionalities of iptables, the Linux firewall
How many shares must be sold : The share currently sells for $8.00 and there are 150 million shares outstanding. How many shares must be sold if the subscription price is $7.50
Prepare general journal entries to record the transactions : Prepare General Journal entries to record the following periodic system merchandising transactions for Safety Merchandising
Prepare the operating activities section of the statement : In Inventory of $14,500, and a decrease In accounts payable of $44,000. Prepare the operating activities section of the statement of cash flows
Visualization Case - Are You Ready for Football : Visualization Case: Are You Ready for Football? Which visualization was the most difficult or complicated to understand easily? Explain

Reviews

Write a Review

Computer Network Security Questions & Answers

  MN624 Digital Forensic Assignment

MN624 Digital Forensic Assignment Help and Solution, Melbourne Institute of Technology Assessment Writing Service - Digital Forensics: Challenges and approaches

  Relationships between a trusted and an untrusted network

Discuss biometrics. Identify the most widely used technology and why this is the case. What are the relationships between a trusted and an untrusted network

  Write down a 1000- to 1500-word paper explaining the

write a 1000- to 1500-word paper describing the importance of policies and standards for maintaining information

  Define a secure system in the blp model

How would you define a secure system in the BLP model - A Security Policy is a statement that partitions the states of the system into a set of authorized, or secure, states and a set of unauthorized, or non-secure, states.

  Use private key to decrypt the cipher text

Using blocks of 4 encrypt the message I AM AN MSC STUDENT MAJORING IN SECURITY using the public key above. Similarly use the private key above to decrypt the cipher text.

  Critical analysis

Develop a clear thesis and use details and quotations from the text to support your arguments. Do not waste a lot of space on a long, generalized introduction

  Kaiser permanente implements her system

Compose a survey of the industry's use of electronic health record and management of its related issues such as data-sharing, security, privacy, regulation compliance

  Describe methods you would use to identify related exploits

Describe the method(s) you would use to identify the related exploit(s). Explain your desired method(s) to perform this vulnerability analysis.

  Describe emerging technology and trend in telecommunications

The networking industry is evolving very rapidly and various types of technologies such as data, voice and video networks are converging.

  ICTSUS601 Integrate sustainability in ICT planning

ICTSUS601 Integrate sustainability in ICT planning and design projects Assignment Help and Solution, Australian Harbour International College - Assessment Help

  BIT361 Security Management and Governance Assignment

BIT361 Security Management and Governance Assignment Help and Solution, Melbourne Polytechnic - Assessment Writing Service

  Examine potential security risks

Examine potential security risks, data breaches, and lost devices. Provide guidelines on how these risks could be mitigated

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd