SlideShare a Scribd company logo
SeminarSeminar
onon
Window FIREWALLWindow FIREWALL
And IPTABLESAnd IPTABLES
Turning small Mind
Into
Hackers
Topic CoveredTopic Covered
What is Firewall ?.
Types of Firewall.
What is Iptables ?.
Packet Processing In Iptables.
Various Commands.
Example.
What is FirewallWhat is Firewall
 A firewall is a software or hardware-
based network security system that
controls the incoming and outgoing
network traffic by analyzing the data
packets and determining whether they
should be allowed through or not, based
on applied rule set.
 A firewall establishes a barrier between a
trusted, secure internal network and
another network (e.g., the Internet) that is
not assumed to be secure and trusted.[
Types of FirewallTypes of Firewall
There are different types of firewalls
depending on where the communication is
taking place, where the communication is
intercepted and the state that is being
traced :->
1.Network Layer/Packet Filters.
2.Application layer.
3.Proxies.
4.Network Address Translation(NAT).
Types of FirewallTypes of Firewall
 Network layer or packet filters
Network layer firewalls, also called
packet filters, operate at a relatively low level
of the TCP/IP protocol stack, not allowing
packets to pass through the firewall unless
they match the established rule set. The
firewall administrator may define the rules;
or default rules may apply.
The term "packet filter" originated in the
context of BSD operating systems.
Types of FirewallTypes of Firewall
Stateful and Stateless Network LayerStateful and Stateless Network Layer
Stateful Stateless
 Stateful firewalls maintain
context about active sessions,
and use that "state
information" to speed packet
processing. If a packet does not
match an existing connection, it
will be evaluated according to
the ruleset for new
connections. If a packet
matches an existing connection
based on comparison with the
firewall's state table, it will be
allowed to pass without
further processing.
 Stateless firewalls require less
memory, and can be faster for
simple filters that require less
time to filter than to look up a
session.They may also be
necessary for filtering stateless
network protocols that have
no concept of a session.
However, they cannot make
more complex decisions based
on what stage communications
between hosts have reached.
Types of FirewallTypes of Firewall
Application Layer:-> Application-layer firewalls
work on the application level of the TCP/IP stack
(i.e., all browser traffic, or all telnet or ftp traffic),
and may intercept all packets travelling to or from
an application and they block other packets.
-> Application firewalls function by determining
whether a process should accept any given
connection. Application firewalls accomplish their
function by hooking into socket calls to filter the
connections between the application layer and the
lower layers of the OSI model. Application
firewalls that hook into socket calls are also
referred to as socket filters
Types of FirewallTypes of Firewall
Proxies:-> A proxy server may act as a firewall by
responding to input packets (connection requests,
for example) in the manner of an application,
while blocking other packets.
A proxy server is a gateway from one network to
another for a specific network application, in the
sense that it functions as a proxy on behalf of the
network user.
Intruders may hijack a publicly reachable system
and use it as a proxy for their own purposes; the
proxy then masquerades as that system to other
internal machines
Types of FirewallTypes of Firewall
Network Address Translation(NAT):->
->Firewalls often have network address
translation (NAT) functionality, and the
hosts protected behind a firewall
commonly have addresses in the "private
address range", as defined in RFC 1918.
-> Firewalls often have such functionality to
hide the true address of protected hosts.
IP-TABLESIP-TABLES
Iptables is the firewall used on the Linux
platform.
Prior to Iptables and Ipchains were among
the most popular Linux firewalls.
They had certain imperfections which were
fixed, resulting in a new product from the
NetFilter organization called IP-TABLES.
RedHat and Fedora Linux have made
Iptables their default pre-installed firewall
package.
Packet Processing In IptablesPacket Processing In Iptables
Every packet passes via a series of built-in
queues called tables for processing.
Basically, there are three tables:
-> Filter Table: The default table for handling
network packets.
-> NAT Table: Used to alter packets that create a
new connection.
-> Mangle Table: Used for specific types of packet
alteration. It is a combination of both filter and Nat
table.
Option used in Iptable commandsOption used in Iptable commands
When using the iptables command, specify
the following options:
◦ Packet Type : Dictates what type of packets
the command filters.
◦ Packet Source/Destination : Dictates which
packets the command filters based on the
source or destination of the packet.
◦ Target : Dictates what action is taken on
packets matching the above criteria.
Various CommandsVarious Commands
–A : Appends the iptables rule to the end of
the specified chain.
–F : Flushes the selected chain, which
effectively deletes every rule in the the
chain.
–L : Lists all of the rules in the chain
specified after the command.
iptables –L <chain-name> –t <table-name>
–N : Creates a new chain with a user-
specified name.
–P : Sets the default policy for a particular
chain, so that when packets traverse an
entire chain without matching a rule, they
will be sent on to a particular target, such as
ACCEPT or DROP.
General Iptables Match CriteriaGeneral Iptables Match Criteria
Iptables command Description
-t <table> If you don't specify a table, then the filter table is assumed. As
discussed before, the possible built-in tables include: filter, nat, mangle
-j <target> Jump to the specified target chain when the packet matches the
current rule.
-p <protocol-type> Match protocol. Types include, icmp, tcp, udp, and
all
-s/-d <ip-address> Match source/destination IP address
-i <interface-
name>
Match "input" interface on which the packet enters.
-o <interface-
name>
Match "output" interface on which the packet exits
Loading Kernel Modules Needed ByLoading Kernel Modules Needed By
IptablesIptables
The iptables application requires you to load certain
kernel modules to activate some of its functions.
Whenever any type of NAT is required, the iptable_nat
module needs to be loaded. The ip_conntrack_ftp
module needs to be added for FTP support and should
always be loaded with the ip_conntrack module which
tracks TCP connection states.
# File: /etc/rc.local
# Module to track the state of connections
modprobe ip_conntrack
# Load the iptables active FTP module, requires
ip_conntrack
modprobe ip_conntrack_ftp
# Load iptables NAT module when required
modprobe iptable_nat
# Module required for active an FTP server using NAT
modprobe ip_nat_ftp
Example:Example: Allowing DNS Access ToAllowing DNS Access To
FirewallFirewall
#-------------------------------------------------
-----
# Allow outbound DNS queries from the FW
and the replies too
# Interface eth0 is the internet interface
# Zone transfers use TCP and not UDP. Most
home networks
# websites using a single DNS server won't
require TCP statements
#-------------------------------------------------
-----
iptables -A OUTPUT -p udp -o eth0
--dport 53 --sport 1024:65535 -j
ACCEPT
iptables -A INPUT -p udp -i eth0
--sport 53 --dport 1024:65535 -j
ACCEPT
Allowing Firewall To Access TheAllowing Firewall To Access The
InternetInternet
# Allow port 80 (www) and 443 (https) connections from
the firewall
iptables -A OUTPUT -j ACCEPT -m state
--state NEW,ESTABLISHED,RELATED -o eth0
-p tcp -m multiport --dport 80,443 -m
multiport --sport 1024:65535
# Allow previously established connections
# - Interface eth0 is the internet interface
iptables -A INPUT -j ACCEPT -m state
--state ESTABLISHED,RELATED -i eth0 -p
tcp
If you want all TCP traffic originating from the firewall to
be accepted, then remove the line:
-m multiport --dport 80,443 -m multiport
--sport 1024:65535
“Thank You
for your time
and
Listening me.”

More Related Content

What's hot

Network management aa
Network management  aaNetwork management  aa
Network management aa
Dhani Ahmad
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
Varnnit Jain
 
Kamailio - SIP Routing in Lua
Kamailio - SIP Routing in LuaKamailio - SIP Routing in Lua
Kamailio - SIP Routing in Lua
Daniel-Constantin Mierla
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentation
TayabaZahid
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
Jeff Potts
 
Network Packet Analysis with Wireshark
Network Packet Analysis with WiresharkNetwork Packet Analysis with Wireshark
Network Packet Analysis with Wireshark
Jim Gilsinn
 
CCNA-2 SRWE Mod-11 Switch Security Configuration
CCNA-2 SRWE Mod-11 Switch Security ConfigurationCCNA-2 SRWE Mod-11 Switch Security Configuration
CCNA-2 SRWE Mod-11 Switch Security Configuration
Mukesh Chinta
 
All about Firewalls ,IPS IDS and the era of UTM in a nutshell
All  about Firewalls ,IPS IDS and the era of UTM in a nutshellAll  about Firewalls ,IPS IDS and the era of UTM in a nutshell
All about Firewalls ,IPS IDS and the era of UTM in a nutshell
Hishan Shouketh
 
OSI layer by cisco
OSI layer by ciscoOSI layer by cisco
OSI layer by cisco
SMKN 3 Kota Tangerang
 
Wireshark
WiresharkWireshark
VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )
Kashyap Mandaliya
 
Wireshark
WiresharkWireshark
Wireshark
Sourav Roy
 
CCNA training 101
CCNA training 101CCNA training 101
CCNA training 101
Rohan Reddy
 
Introduction of firewall slides
Introduction of firewall slidesIntroduction of firewall slides
Introduction of firewall slides
rahul kundu
 
Firewall & Proxy Server
Firewall & Proxy ServerFirewall & Proxy Server
Firewall & Proxy Server
LakshyaArora12
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
Cisco Canada
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)
Anwesh Dixit
 
Wireshark
WiresharkWireshark
Wireshark
Vijay kumar
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
Pradeep Kumar
 
Lecture 4 firewalls
Lecture 4 firewallsLecture 4 firewalls
Lecture 4 firewalls
rajakhurram
 

What's hot (20)

Network management aa
Network management  aaNetwork management  aa
Network management aa
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
Kamailio - SIP Routing in Lua
Kamailio - SIP Routing in LuaKamailio - SIP Routing in Lua
Kamailio - SIP Routing in Lua
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentation
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
 
Network Packet Analysis with Wireshark
Network Packet Analysis with WiresharkNetwork Packet Analysis with Wireshark
Network Packet Analysis with Wireshark
 
CCNA-2 SRWE Mod-11 Switch Security Configuration
CCNA-2 SRWE Mod-11 Switch Security ConfigurationCCNA-2 SRWE Mod-11 Switch Security Configuration
CCNA-2 SRWE Mod-11 Switch Security Configuration
 
All about Firewalls ,IPS IDS and the era of UTM in a nutshell
All  about Firewalls ,IPS IDS and the era of UTM in a nutshellAll  about Firewalls ,IPS IDS and the era of UTM in a nutshell
All about Firewalls ,IPS IDS and the era of UTM in a nutshell
 
OSI layer by cisco
OSI layer by ciscoOSI layer by cisco
OSI layer by cisco
 
Wireshark
WiresharkWireshark
Wireshark
 
VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )VULNERABILITY ( CYBER SECURITY )
VULNERABILITY ( CYBER SECURITY )
 
Wireshark
WiresharkWireshark
Wireshark
 
CCNA training 101
CCNA training 101CCNA training 101
CCNA training 101
 
Introduction of firewall slides
Introduction of firewall slidesIntroduction of firewall slides
Introduction of firewall slides
 
Firewall & Proxy Server
Firewall & Proxy ServerFirewall & Proxy Server
Firewall & Proxy Server
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)
 
Wireshark
WiresharkWireshark
Wireshark
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
 
Lecture 4 firewalls
Lecture 4 firewallsLecture 4 firewalls
Lecture 4 firewalls
 

Similar to I ptable

Firewall
FirewallFirewall
IPTABLES_linux_Firewall_Administration (1).pdf
IPTABLES_linux_Firewall_Administration (1).pdfIPTABLES_linux_Firewall_Administration (1).pdf
IPTABLES_linux_Firewall_Administration (1).pdf
mpassword
 
Unix Web servers and FireWall
Unix Web servers and FireWallUnix Web servers and FireWall
Unix Web servers and FireWall
webhostingguy
 
Unix Web servers and FireWall
Unix Web servers and FireWallUnix Web servers and FireWall
Unix Web servers and FireWall
webhostingguy
 
Cyber security tutorial2
Cyber security tutorial2Cyber security tutorial2
Cyber security tutorial2
sweta dargad
 
Network &amp; security startup
Network &amp; security startupNetwork &amp; security startup
Network &amp; security startup
Finto Thomas , CISSP, TOGAF, CCSP, ITIL. JNCIS
 
The Complete Questionnaires About Firewall
The Complete Questionnaires About FirewallThe Complete Questionnaires About Firewall
The Complete Questionnaires About Firewall
Vishal Kumar
 
IP Tables And Filtering
IP Tables And FilteringIP Tables And Filtering
IP Tables And Filtering
SuperstarRr
 
Iptables the Linux Firewall
Iptables the Linux Firewall Iptables the Linux Firewall
Iptables the Linux Firewall
Syed fawad Gillani
 
Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
Emin Abdul Azeez
 
Firewalls
FirewallsFirewalls
Firewalls
junaid15bsse
 
Firewalls (6)
Firewalls (6)Firewalls (6)
Firewalls (6)
Bhargu Bhargavi
 
introduction of iptables in linux
introduction of iptables in linuxintroduction of iptables in linux
introduction of iptables in linux
Nouman Baloch
 
What is Protocol.docx
What is Protocol.docxWhat is Protocol.docx
What is Protocol.docx
kndnewguade
 
Lec # 13 Firewall.pptx
Lec # 13 Firewall.pptxLec # 13 Firewall.pptx
Lec # 13 Firewall.pptx
skknowledge
 
CN. Presentation for submitting project term pptx
CN. Presentation for submitting project term pptxCN. Presentation for submitting project term pptx
CN. Presentation for submitting project term pptx
saad504633
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTU
Mumbai University
 
Firewall
FirewallFirewall
Firewall
Shivank Shah
 
firewall and its types
firewall and its typesfirewall and its types
firewall and its types
Mohammed Maajidh
 
Firewalls
FirewallsFirewalls

Similar to I ptable (20)

Firewall
FirewallFirewall
Firewall
 
IPTABLES_linux_Firewall_Administration (1).pdf
IPTABLES_linux_Firewall_Administration (1).pdfIPTABLES_linux_Firewall_Administration (1).pdf
IPTABLES_linux_Firewall_Administration (1).pdf
 
Unix Web servers and FireWall
Unix Web servers and FireWallUnix Web servers and FireWall
Unix Web servers and FireWall
 
Unix Web servers and FireWall
Unix Web servers and FireWallUnix Web servers and FireWall
Unix Web servers and FireWall
 
Cyber security tutorial2
Cyber security tutorial2Cyber security tutorial2
Cyber security tutorial2
 
Network &amp; security startup
Network &amp; security startupNetwork &amp; security startup
Network &amp; security startup
 
The Complete Questionnaires About Firewall
The Complete Questionnaires About FirewallThe Complete Questionnaires About Firewall
The Complete Questionnaires About Firewall
 
IP Tables And Filtering
IP Tables And FilteringIP Tables And Filtering
IP Tables And Filtering
 
Iptables the Linux Firewall
Iptables the Linux Firewall Iptables the Linux Firewall
Iptables the Linux Firewall
 
Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
 
Firewalls
FirewallsFirewalls
Firewalls
 
Firewalls (6)
Firewalls (6)Firewalls (6)
Firewalls (6)
 
introduction of iptables in linux
introduction of iptables in linuxintroduction of iptables in linux
introduction of iptables in linux
 
What is Protocol.docx
What is Protocol.docxWhat is Protocol.docx
What is Protocol.docx
 
Lec # 13 Firewall.pptx
Lec # 13 Firewall.pptxLec # 13 Firewall.pptx
Lec # 13 Firewall.pptx
 
CN. Presentation for submitting project term pptx
CN. Presentation for submitting project term pptxCN. Presentation for submitting project term pptx
CN. Presentation for submitting project term pptx
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTU
 
Firewall
FirewallFirewall
Firewall
 
firewall and its types
firewall and its typesfirewall and its types
firewall and its types
 
Firewalls
FirewallsFirewalls
Firewalls
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 

I ptable

  • 1. SeminarSeminar onon Window FIREWALLWindow FIREWALL And IPTABLESAnd IPTABLES Turning small Mind Into Hackers
  • 2. Topic CoveredTopic Covered What is Firewall ?. Types of Firewall. What is Iptables ?. Packet Processing In Iptables. Various Commands. Example.
  • 3. What is FirewallWhat is Firewall  A firewall is a software or hardware- based network security system that controls the incoming and outgoing network traffic by analyzing the data packets and determining whether they should be allowed through or not, based on applied rule set.  A firewall establishes a barrier between a trusted, secure internal network and another network (e.g., the Internet) that is not assumed to be secure and trusted.[
  • 4. Types of FirewallTypes of Firewall There are different types of firewalls depending on where the communication is taking place, where the communication is intercepted and the state that is being traced :-> 1.Network Layer/Packet Filters. 2.Application layer. 3.Proxies. 4.Network Address Translation(NAT).
  • 5. Types of FirewallTypes of Firewall  Network layer or packet filters Network layer firewalls, also called packet filters, operate at a relatively low level of the TCP/IP protocol stack, not allowing packets to pass through the firewall unless they match the established rule set. The firewall administrator may define the rules; or default rules may apply. The term "packet filter" originated in the context of BSD operating systems.
  • 6. Types of FirewallTypes of Firewall Stateful and Stateless Network LayerStateful and Stateless Network Layer Stateful Stateless  Stateful firewalls maintain context about active sessions, and use that "state information" to speed packet processing. If a packet does not match an existing connection, it will be evaluated according to the ruleset for new connections. If a packet matches an existing connection based on comparison with the firewall's state table, it will be allowed to pass without further processing.  Stateless firewalls require less memory, and can be faster for simple filters that require less time to filter than to look up a session.They may also be necessary for filtering stateless network protocols that have no concept of a session. However, they cannot make more complex decisions based on what stage communications between hosts have reached.
  • 7. Types of FirewallTypes of Firewall Application Layer:-> Application-layer firewalls work on the application level of the TCP/IP stack (i.e., all browser traffic, or all telnet or ftp traffic), and may intercept all packets travelling to or from an application and they block other packets. -> Application firewalls function by determining whether a process should accept any given connection. Application firewalls accomplish their function by hooking into socket calls to filter the connections between the application layer and the lower layers of the OSI model. Application firewalls that hook into socket calls are also referred to as socket filters
  • 8. Types of FirewallTypes of Firewall Proxies:-> A proxy server may act as a firewall by responding to input packets (connection requests, for example) in the manner of an application, while blocking other packets. A proxy server is a gateway from one network to another for a specific network application, in the sense that it functions as a proxy on behalf of the network user. Intruders may hijack a publicly reachable system and use it as a proxy for their own purposes; the proxy then masquerades as that system to other internal machines
  • 9. Types of FirewallTypes of Firewall Network Address Translation(NAT):-> ->Firewalls often have network address translation (NAT) functionality, and the hosts protected behind a firewall commonly have addresses in the "private address range", as defined in RFC 1918. -> Firewalls often have such functionality to hide the true address of protected hosts.
  • 10. IP-TABLESIP-TABLES Iptables is the firewall used on the Linux platform. Prior to Iptables and Ipchains were among the most popular Linux firewalls. They had certain imperfections which were fixed, resulting in a new product from the NetFilter organization called IP-TABLES. RedHat and Fedora Linux have made Iptables their default pre-installed firewall package.
  • 11. Packet Processing In IptablesPacket Processing In Iptables Every packet passes via a series of built-in queues called tables for processing. Basically, there are three tables: -> Filter Table: The default table for handling network packets. -> NAT Table: Used to alter packets that create a new connection. -> Mangle Table: Used for specific types of packet alteration. It is a combination of both filter and Nat table.
  • 12. Option used in Iptable commandsOption used in Iptable commands When using the iptables command, specify the following options: ◦ Packet Type : Dictates what type of packets the command filters. ◦ Packet Source/Destination : Dictates which packets the command filters based on the source or destination of the packet. ◦ Target : Dictates what action is taken on packets matching the above criteria.
  • 13. Various CommandsVarious Commands –A : Appends the iptables rule to the end of the specified chain. –F : Flushes the selected chain, which effectively deletes every rule in the the chain. –L : Lists all of the rules in the chain specified after the command. iptables –L <chain-name> –t <table-name> –N : Creates a new chain with a user- specified name. –P : Sets the default policy for a particular chain, so that when packets traverse an entire chain without matching a rule, they will be sent on to a particular target, such as ACCEPT or DROP.
  • 14. General Iptables Match CriteriaGeneral Iptables Match Criteria Iptables command Description -t <table> If you don't specify a table, then the filter table is assumed. As discussed before, the possible built-in tables include: filter, nat, mangle -j <target> Jump to the specified target chain when the packet matches the current rule. -p <protocol-type> Match protocol. Types include, icmp, tcp, udp, and all -s/-d <ip-address> Match source/destination IP address -i <interface- name> Match "input" interface on which the packet enters. -o <interface- name> Match "output" interface on which the packet exits
  • 15. Loading Kernel Modules Needed ByLoading Kernel Modules Needed By IptablesIptables The iptables application requires you to load certain kernel modules to activate some of its functions. Whenever any type of NAT is required, the iptable_nat module needs to be loaded. The ip_conntrack_ftp module needs to be added for FTP support and should always be loaded with the ip_conntrack module which tracks TCP connection states. # File: /etc/rc.local # Module to track the state of connections modprobe ip_conntrack # Load the iptables active FTP module, requires ip_conntrack modprobe ip_conntrack_ftp # Load iptables NAT module when required modprobe iptable_nat # Module required for active an FTP server using NAT modprobe ip_nat_ftp
  • 16. Example:Example: Allowing DNS Access ToAllowing DNS Access To FirewallFirewall #------------------------------------------------- ----- # Allow outbound DNS queries from the FW and the replies too # Interface eth0 is the internet interface # Zone transfers use TCP and not UDP. Most home networks # websites using a single DNS server won't require TCP statements #------------------------------------------------- ----- iptables -A OUTPUT -p udp -o eth0 --dport 53 --sport 1024:65535 -j ACCEPT iptables -A INPUT -p udp -i eth0 --sport 53 --dport 1024:65535 -j ACCEPT
  • 17. Allowing Firewall To Access TheAllowing Firewall To Access The InternetInternet # Allow port 80 (www) and 443 (https) connections from the firewall iptables -A OUTPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -o eth0 -p tcp -m multiport --dport 80,443 -m multiport --sport 1024:65535 # Allow previously established connections # - Interface eth0 is the internet interface iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -i eth0 -p tcp If you want all TCP traffic originating from the firewall to be accepted, then remove the line: -m multiport --dport 80,443 -m multiport --sport 1024:65535
  • 18. “Thank You for your time and Listening me.”