SlideShare a Scribd company logo
IPTables
Getting Started

Nishanth Kumar
n|u Bangalore chapter member

n|u / OWASP / G4H / SecurityXploded meet
22 Feb 2014
Agenda
• Firewall Basics
• Packet Basics
• Linux Firewalls
• What you can do with IPTables
• What you can’t do with IP Tables

• What you need to know about IP Tables
• Few Examples & Demo

22 Feb 2014
Firewalls
 Prevents Unauthorized access TO or FROM network.
 Hardware / Software / both

22 Feb 2014
What Firewalls do ?
 Filtering traffic based on POLICY
 Policy determines what is acceptable traffic
 Access control over traffic
 Accept or Deny
 May perform other duties
 Logging ( Forensics , SLA )
 Flagging ( Intrusion Detection )
 QOS ( bandwidth management , inbound &outbound traffic
priority )

22 Feb 2014
Typical Packet looks like …

22 Feb 2014
Linux Firewalls
 IP Cop
 Shore wall
 UFW – Uncomplicated Firewall
 Open BSD & PF

Most of the above firewall intern uses IPTables .

22 Feb 2014
Some basic commands
 service iptables status
 The above command is used to check the status of iptables
 service iptables start
 The above command is used to start the iptables
 service iptables stop
 The above command is used to stop the iptables
 iptables –F or iptables --flush
 The above command is used to clean-up all the default rules
and existing rules.

22 Feb 2014
Ping Block - DROP

iptables -A INPUT -p icmp -j DROP
22 Feb 2014
Description of rule

iptables -A INPUT -p icmp -j DROP
Service
PROTOCOL
NAME

APPEND
INPUT Chain

JUMP
PROTOCOL

TARGET

22 Feb 2014
Ping Block - REJECT

iptables -A INPUT -p icmp -j REJECT
22 Feb 2014
Description of rule

iptables -A INPUT -p icmp -j REJECT
Service
PROTOCOL
NAME

APPEND
INPUT Chain

JUMP
PROTOCOL

TARGET

22 Feb 2014
Web Server - Client Example

iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP
22 Feb 2014
Description of rule
iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP
Service
APPEND

INPUT
INTERFACE

INPUT Chain

PROTOCOL
NAME

Port
Number

PROTOCOL
JUMP
INTERFACE NAME
Destination Port

TARGET

22 Feb 2014
Web Server - Client Example - 1

192.168.99.12

192.168.99.11

iptables -A INPUT –s 192.168.99.12 -p tcp --dport 80 -j DROP
22 Feb 2014
Description of rule
iptables -A INPUT -s 192.168.99.12 -p tcp --dport 80 -j DROP

Service
APPEND

Source

PROTOCOL
NAME

Port
Number

INPUT Chain
PROTOCOL

JUMP

IP Address of the Source
Destination Port

TARGET

22 Feb 2014
Continue in Part 2

Thank you

22 Feb 2014

More Related Content

PPT
Iptables
PDF
Introduction to firewalls through Iptables
PDF
Iptables fundamentals
PPT
IP tables
PPT
Iptables in linux
ODP
Netfilter: Making large iptables rulesets scale
PDF
IPTables Primer - Part 2
PDF
Packet Filtering Using Iptables
Iptables
Introduction to firewalls through Iptables
Iptables fundamentals
IP tables
Iptables in linux
Netfilter: Making large iptables rulesets scale
IPTables Primer - Part 2
Packet Filtering Using Iptables

What's hot (17)

PDF
Iptables Configuration
PPTX
Iptables the Linux Firewall
PDF
Fcsi601 Linux Firewall Nat
PDF
Basics of firewall, ebtables, arptables and iptables
PPTX
Understanding iptables
PPT
IPTABLES
PPTX
Cisco CCNA IP SLA with tracking configuration
PPTX
Juniper JNCIA – Juniper RIP Route Configuration
KEY
Fosscon 2012 firewall workshop
DOCX
Router Commands Overview
PPT
Ip6 tables in linux
PDF
03 linuxfirewall1
PPTX
How to convert your Linux box into Security Gateway - Part 1
PDF
25 most frequently used linux ip tables rules examples
PPTX
Cisco CCNA OSPF IPV6 Configuration
PPT
In depth understanding network security
PPTX
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Iptables Configuration
Iptables the Linux Firewall
Fcsi601 Linux Firewall Nat
Basics of firewall, ebtables, arptables and iptables
Understanding iptables
IPTABLES
Cisco CCNA IP SLA with tracking configuration
Juniper JNCIA – Juniper RIP Route Configuration
Fosscon 2012 firewall workshop
Router Commands Overview
Ip6 tables in linux
03 linuxfirewall1
How to convert your Linux box into Security Gateway - Part 1
25 most frequently used linux ip tables rules examples
Cisco CCNA OSPF IPV6 Configuration
In depth understanding network security
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Ad

Viewers also liked (9)

PDF
IP Tables Getting Started - Part 2
PPTX
NOS Comparison
PPT
IP Address
PDF
Open vSwitch - Stateful Connection Tracking & Stateful NAT
PDF
Cilium - Fast IPv6 Container Networking with BPF and XDP
PDF
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
PPS
Ip address
PPT
Ip address and subnetting
PPTX
Internet protocol (ip) ppt
IP Tables Getting Started - Part 2
NOS Comparison
IP Address
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Cilium - Fast IPv6 Container Networking with BPF and XDP
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Ip address
Ip address and subnetting
Internet protocol (ip) ppt
Ad

Similar to IP Tables Primer - Part 1 (20)

PPT
Linux Firewall - NullCon Chennai Presentation
PDF
Iptablesrocks
DOCX
How to Install iptable on Debian 12.docx
PDF
Linux firewall
PPTX
PPTX
introduction of iptables in linux
PDF
Preventing Traffic with Spoofed Source IP address
DOCX
25 most frequently used linux ip tables rules examples
DOCX
25 most frequently used linux ip tables rules examples
PDF
Aruba OS 7.3 Command Line Interface Reference Guide
PDF
SRE NL MeetUp - eBPF.pdf
PDF
iptable casestudy by sans.pdf
PDF
Experience of Implementing IPTV in an ISP Network by Thong Hawk Yen
PPTX
Implementing Telematic Services
DOCX
Creating a firewall in UBUNTU
PPTX
Week 4 Linux Firewalls 1_868612559.pptx
PDF
Summit 16: The Hitchhiker/Hacker's Guide to NFV Benchmarking
PDF
X-Device Service Discovery
PPT
Integrating Active Networking and Commercial-Grade Routing Platforms
PDF
Intro to shorewall
Linux Firewall - NullCon Chennai Presentation
Iptablesrocks
How to Install iptable on Debian 12.docx
Linux firewall
introduction of iptables in linux
Preventing Traffic with Spoofed Source IP address
25 most frequently used linux ip tables rules examples
25 most frequently used linux ip tables rules examples
Aruba OS 7.3 Command Line Interface Reference Guide
SRE NL MeetUp - eBPF.pdf
iptable casestudy by sans.pdf
Experience of Implementing IPTV in an ISP Network by Thong Hawk Yen
Implementing Telematic Services
Creating a firewall in UBUNTU
Week 4 Linux Firewalls 1_868612559.pptx
Summit 16: The Hitchhiker/Hacker's Guide to NFV Benchmarking
X-Device Service Discovery
Integrating Active Networking and Commercial-Grade Routing Platforms
Intro to shorewall

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Big Data Technologies - Introduction.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Building Integrated photovoltaic BIPV_UPV.pdf
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
MIND Revenue Release Quarter 2 2025 Press Release

IP Tables Primer - Part 1

  • 1. IPTables Getting Started Nishanth Kumar n|u Bangalore chapter member n|u / OWASP / G4H / SecurityXploded meet 22 Feb 2014
  • 2. Agenda • Firewall Basics • Packet Basics • Linux Firewalls • What you can do with IPTables • What you can’t do with IP Tables • What you need to know about IP Tables • Few Examples & Demo 22 Feb 2014
  • 3. Firewalls  Prevents Unauthorized access TO or FROM network.  Hardware / Software / both 22 Feb 2014
  • 4. What Firewalls do ?  Filtering traffic based on POLICY  Policy determines what is acceptable traffic  Access control over traffic  Accept or Deny  May perform other duties  Logging ( Forensics , SLA )  Flagging ( Intrusion Detection )  QOS ( bandwidth management , inbound &outbound traffic priority ) 22 Feb 2014
  • 5. Typical Packet looks like … 22 Feb 2014
  • 6. Linux Firewalls  IP Cop  Shore wall  UFW – Uncomplicated Firewall  Open BSD & PF Most of the above firewall intern uses IPTables . 22 Feb 2014
  • 7. Some basic commands  service iptables status  The above command is used to check the status of iptables  service iptables start  The above command is used to start the iptables  service iptables stop  The above command is used to stop the iptables  iptables –F or iptables --flush  The above command is used to clean-up all the default rules and existing rules. 22 Feb 2014
  • 8. Ping Block - DROP iptables -A INPUT -p icmp -j DROP 22 Feb 2014
  • 9. Description of rule iptables -A INPUT -p icmp -j DROP Service PROTOCOL NAME APPEND INPUT Chain JUMP PROTOCOL TARGET 22 Feb 2014
  • 10. Ping Block - REJECT iptables -A INPUT -p icmp -j REJECT 22 Feb 2014
  • 11. Description of rule iptables -A INPUT -p icmp -j REJECT Service PROTOCOL NAME APPEND INPUT Chain JUMP PROTOCOL TARGET 22 Feb 2014
  • 12. Web Server - Client Example iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP 22 Feb 2014
  • 13. Description of rule iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP Service APPEND INPUT INTERFACE INPUT Chain PROTOCOL NAME Port Number PROTOCOL JUMP INTERFACE NAME Destination Port TARGET 22 Feb 2014
  • 14. Web Server - Client Example - 1 192.168.99.12 192.168.99.11 iptables -A INPUT –s 192.168.99.12 -p tcp --dport 80 -j DROP 22 Feb 2014
  • 15. Description of rule iptables -A INPUT -s 192.168.99.12 -p tcp --dport 80 -j DROP Service APPEND Source PROTOCOL NAME Port Number INPUT Chain PROTOCOL JUMP IP Address of the Source Destination Port TARGET 22 Feb 2014
  • 16. Continue in Part 2 Thank you 22 Feb 2014