By: Nouman Baloch
You Must Know
 Linux Kernel
 Public and Private Network(LAN and WAN)
 Ports
 IP Addresses
 MAC Addresses
 Packets
 DoS Attack
Topics
 What is firewall
 What is iptables
 Installing iptables
 Targets And Jumps
 Prevent DoS attack
 Conclusion
What is Firewall
 A firewall is hardware, software, or a
combination of both that is used to
prevent unauthorized programs or
Internet users from accessing a private
network and/or a single computer. • A
set of related programs that protects the
resources of a private network from
users from other networks.
What is iptable
 It is the modified firewall package available in
linux operating system. Before it was known as
ipchains, later it comes with some other
improvements are:
 Better integration with the Linux kernel, so improved
speed and reliability.
 Stateful packet inspection.
 Filter packets according to TCP header and MAC
address.
 Better network address translation.
 A rate limiting feature that helps iptables block some
types of denial of service (DoS) attacks.
Installation of iptables
 In most Linux distros including Redhat / CentOS
Linux installs iptables by default. You can use the
following procedure to verify that iptables has
been installed or not in Redhat. Open terminal
and type the following command:
 [root@localhost ~]# sudo info iptables
 For the installation of iptables:
 [root@localhost ~]# apt-get install iptables
Target and Jumps
 Each firewall rule inspects each IP packet and then
tries to identify it as the target. Once a target is
identified, the packet needs to jump over to it for
further processing. -j - Jump to the specified target.
By default, iptables allows four targets:
 ACCEPT - Accept the packet and stop processing rules in
this chain.
 REJECT - Reject the packet and notify the sender that we
did so, and stop processing rules in this chain.
 DROP - Silently ignore the packet, and stop processing rules
in this chain.
 LOG - Log the packet, and continue processing more rules
in this chain.
Preventing Dos Attack
 The following iptables rule will help you prevent the
Denial of Service (DoS) attack on your webserver
 # iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT
 -m limit: This uses the limit iptables extension –limit
25/minute: This limits only maximum of 25 connection
per minute.
 –limit-burst 100: This value indicates that the
limit/minute will be enforced only after the total
number of connection have reached the limit-burst
level.
Conclusion
 We can get different service with this like
firewall, routing, natting, logging and we
can also block some types of DoS
attacks just by implementing few rules in
it.
FEEL FREE TO
ASK ANY
QUESTION
?

introduction of iptables in linux

  • 1.
  • 2.
    You Must Know Linux Kernel  Public and Private Network(LAN and WAN)  Ports  IP Addresses  MAC Addresses  Packets  DoS Attack
  • 3.
    Topics  What isfirewall  What is iptables  Installing iptables  Targets And Jumps  Prevent DoS attack  Conclusion
  • 4.
    What is Firewall A firewall is hardware, software, or a combination of both that is used to prevent unauthorized programs or Internet users from accessing a private network and/or a single computer. • A set of related programs that protects the resources of a private network from users from other networks.
  • 5.
    What is iptable It is the modified firewall package available in linux operating system. Before it was known as ipchains, later it comes with some other improvements are:  Better integration with the Linux kernel, so improved speed and reliability.  Stateful packet inspection.  Filter packets according to TCP header and MAC address.  Better network address translation.  A rate limiting feature that helps iptables block some types of denial of service (DoS) attacks.
  • 6.
    Installation of iptables In most Linux distros including Redhat / CentOS Linux installs iptables by default. You can use the following procedure to verify that iptables has been installed or not in Redhat. Open terminal and type the following command:  [root@localhost ~]# sudo info iptables  For the installation of iptables:  [root@localhost ~]# apt-get install iptables
  • 7.
    Target and Jumps Each firewall rule inspects each IP packet and then tries to identify it as the target. Once a target is identified, the packet needs to jump over to it for further processing. -j - Jump to the specified target. By default, iptables allows four targets:  ACCEPT - Accept the packet and stop processing rules in this chain.  REJECT - Reject the packet and notify the sender that we did so, and stop processing rules in this chain.  DROP - Silently ignore the packet, and stop processing rules in this chain.  LOG - Log the packet, and continue processing more rules in this chain.
  • 8.
    Preventing Dos Attack The following iptables rule will help you prevent the Denial of Service (DoS) attack on your webserver  # iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT  -m limit: This uses the limit iptables extension –limit 25/minute: This limits only maximum of 25 connection per minute.  –limit-burst 100: This value indicates that the limit/minute will be enforced only after the total number of connection have reached the limit-burst level.
  • 9.
    Conclusion  We canget different service with this like firewall, routing, natting, logging and we can also block some types of DoS attacks just by implementing few rules in it.
  • 10.
    FEEL FREE TO ASKANY QUESTION ?