0
IPTables
Getting Started

Nishanth Kumar
n|u Bangalore chapter member

n|u / OWASP / G4H / SecurityXploded meet
22 Feb 201...
Agenda
• Firewall Basics
• Packet Basics
• Linux Firewalls
• What you can do with IPTables
• What you can’t do with IP Tab...
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 ov...
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 us...
Some basic commands
 service iptables status
 The above command is used to check the status of iptables
 service iptabl...
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

2...
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
...
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

PROT...
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 DRO...
Description of rule
iptables -A INPUT -s 192.168.99.12 -p tcp --dport 80 -j DROP

Service
APPEND

Source

PROTOCOL
NAME

P...
Continue in Part 2

Thank you

22 Feb 2014
Upcoming SlideShare
Loading in...5
×

IP Tables Primer - Part 1

1,179

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,179
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
39
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "IP Tables Primer - Part 1"

  1. 1. IPTables Getting Started Nishanth Kumar n|u Bangalore chapter member n|u / OWASP / G4H / SecurityXploded meet 22 Feb 2014
  2. 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. 3. Firewalls  Prevents Unauthorized access TO or FROM network.  Hardware / Software / both 22 Feb 2014
  4. 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. 5. Typical Packet looks like … 22 Feb 2014
  6. 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. 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. 8. Ping Block - DROP iptables -A INPUT -p icmp -j DROP 22 Feb 2014
  9. 9. Description of rule iptables -A INPUT -p icmp -j DROP Service PROTOCOL NAME APPEND INPUT Chain JUMP PROTOCOL TARGET 22 Feb 2014
  10. 10. Ping Block - REJECT iptables -A INPUT -p icmp -j REJECT 22 Feb 2014
  11. 11. Description of rule iptables -A INPUT -p icmp -j REJECT Service PROTOCOL NAME APPEND INPUT Chain JUMP PROTOCOL TARGET 22 Feb 2014
  12. 12. Web Server - Client Example iptables -A INPUT -i eth0 -p tcp --dport 80 -j DROP 22 Feb 2014
  13. 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. 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. 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. 16. Continue in Part 2 Thank you 22 Feb 2014
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×