Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mgiay/bd78c29897028c61358ab17166b62416 to your computer and use it in GitHub Desktop.
Save mgiay/bd78c29897028c61358ab17166b62416 to your computer and use it in GitHub Desktop.

Revisions

  1. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -4,23 +4,23 @@

    ### IPTables has the following 4 built-in tables.

    *1) Filter Table*
    **1) Filter Table**

    Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

    * INPUT chain – Incoming to firewall. For packets coming to the local server.
    * OUTPUT chain – Outgoing from firewall. For packets generated locally and going out of the local server.
    * FORWARD chain – Packet for another NIC on the local server. For packets routed through the local server.

    *2) NAT table*
    **2) NAT table**

    Iptable’s NAT table has the following built-in chains.

    * PREROUTING chain – Alters packets before routing. i.e Packet translation happens immediately after the packet comes to the system (and before routing). This helps to translate the destination ip address of the packets to something that matches the routing on the local server. This is used for DNAT (destination NAT).
    * POSTROUTING chain – Alters packets after routing. i.e Packet translation happens when the packets are leaving the system. This helps to translate the source ip address of the packets to something that might match the routing on the desintation server. This is used for SNAT (source NAT).
    * OUTPUT chain – NAT for locally generated packets on the firewall.

    *3) Mangle table*
    **3) Mangle table**

    Iptables’s Mangle table is for specialized packet alteration. This alters QOS bits in the TCP header. Mangle table has the following built-in chains.

    @@ -30,7 +30,7 @@ Iptables’s Mangle table is for specialized packet alteration. This alters QOS
    * INPUT chain
    * POSTROUTING chain

    *4) Raw table*
    **4) Raw table**

    Iptable’s Raw table is for configuration excemptions. Raw table has the following built-in chains.

  2. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -4,23 +4,23 @@

    ### IPTables has the following 4 built-in tables.

    1) Filter Table
    *1) Filter Table*

    Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

    * INPUT chain – Incoming to firewall. For packets coming to the local server.
    * OUTPUT chain – Outgoing from firewall. For packets generated locally and going out of the local server.
    * FORWARD chain – Packet for another NIC on the local server. For packets routed through the local server.

    2) NAT table
    *2) NAT table*

    Iptable’s NAT table has the following built-in chains.

    * PREROUTING chain – Alters packets before routing. i.e Packet translation happens immediately after the packet comes to the system (and before routing). This helps to translate the destination ip address of the packets to something that matches the routing on the local server. This is used for DNAT (destination NAT).
    * POSTROUTING chain – Alters packets after routing. i.e Packet translation happens when the packets are leaving the system. This helps to translate the source ip address of the packets to something that might match the routing on the desintation server. This is used for SNAT (source NAT).
    * OUTPUT chain – NAT for locally generated packets on the firewall.

    3) Mangle table
    *3) Mangle table*

    Iptables’s Mangle table is for specialized packet alteration. This alters QOS bits in the TCP header. Mangle table has the following built-in chains.

    @@ -30,7 +30,7 @@ Iptables’s Mangle table is for specialized packet alteration. This alters QOS
    * INPUT chain
    * POSTROUTING chain

    4) Raw table
    *4) Raw table*

    Iptable’s Raw table is for configuration excemptions. Raw table has the following built-in chains.

  3. Brent Salisbury revised this gist Jul 17, 2015. No changes.
  4. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -4,23 +4,23 @@

    ### IPTables has the following 4 built-in tables.

    1. Filter Table
    1) Filter Table

    Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

    * INPUT chain – Incoming to firewall. For packets coming to the local server.
    * OUTPUT chain – Outgoing from firewall. For packets generated locally and going out of the local server.
    * FORWARD chain – Packet for another NIC on the local server. For packets routed through the local server.

    2. NAT table
    2) NAT table

    Iptable’s NAT table has the following built-in chains.

    * PREROUTING chain – Alters packets before routing. i.e Packet translation happens immediately after the packet comes to the system (and before routing). This helps to translate the destination ip address of the packets to something that matches the routing on the local server. This is used for DNAT (destination NAT).
    * POSTROUTING chain – Alters packets after routing. i.e Packet translation happens when the packets are leaving the system. This helps to translate the source ip address of the packets to something that might match the routing on the desintation server. This is used for SNAT (source NAT).
    * OUTPUT chain – NAT for locally generated packets on the firewall.

    3. Mangle table
    3) Mangle table

    Iptables’s Mangle table is for specialized packet alteration. This alters QOS bits in the TCP header. Mangle table has the following built-in chains.

    @@ -30,7 +30,7 @@ Iptables’s Mangle table is for specialized packet alteration. This alters QOS
    * INPUT chain
    * POSTROUTING chain

    4. Raw table
    4) Raw table

    Iptable’s Raw table is for configuration excemptions. Raw table has the following built-in chains.

  5. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 35 additions and 0 deletions.
    35 changes: 35 additions & 0 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,40 @@
    # Linux NetFilter, IP Tables and Conntrack Diagrams

    ## IPTABLES TABLES and CHAINS

    ### IPTables has the following 4 built-in tables.

    1. Filter Table

    Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

    * INPUT chain – Incoming to firewall. For packets coming to the local server.
    * OUTPUT chain – Outgoing from firewall. For packets generated locally and going out of the local server.
    * FORWARD chain – Packet for another NIC on the local server. For packets routed through the local server.

    2. NAT table

    Iptable’s NAT table has the following built-in chains.

    * PREROUTING chain – Alters packets before routing. i.e Packet translation happens immediately after the packet comes to the system (and before routing). This helps to translate the destination ip address of the packets to something that matches the routing on the local server. This is used for DNAT (destination NAT).
    * POSTROUTING chain – Alters packets after routing. i.e Packet translation happens when the packets are leaving the system. This helps to translate the source ip address of the packets to something that might match the routing on the desintation server. This is used for SNAT (source NAT).
    * OUTPUT chain – NAT for locally generated packets on the firewall.

    3. Mangle table

    Iptables’s Mangle table is for specialized packet alteration. This alters QOS bits in the TCP header. Mangle table has the following built-in chains.

    * PREROUTING chain
    * OUTPUT chain
    * FORWARD chain
    * INPUT chain
    * POSTROUTING chain

    4. Raw table

    Iptable’s Raw table is for configuration excemptions. Raw table has the following built-in chains.


    ![](https://cloud.githubusercontent.com/assets/1711674/8742360/87f429c4-2c32-11e5-8535-5a99d5149ff3.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742361/87f7efa0-2c32-11e5-9ece-fbd39411371c.gif)
  6. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    # Linux NetFilter, IP Tables and Conntrack Diagrams

    ![](https://cloud.githubusercontent.com/assets/1711674/8742360/87f429c4-2c32-11e5-8535-5a99d5149ff3.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742361/87f7efa0-2c32-11e5-9ece-fbd39411371c.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742362/87fa6654-2c32-11e5-84d6-3ca58dda0a8d.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742353/87ddb284-2c32-11e5-9c9b-bca491c8d0e3.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742356/87e025d2-2c32-11e5-8d62-50f9baf4bc81.gif)
    @@ -18,10 +24,4 @@
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742359/87f1e966-2c32-11e5-9f65-90ae592bf8c0.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742360/87f429c4-2c32-11e5-8535-5a99d5149ff3.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742361/87f7efa0-2c32-11e5-9ece-fbd39411371c.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742362/87fa6654-2c32-11e5-84d6-3ca58dda0a8d.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742363/87fad710-2c32-11e5-8896-7adf1a4cf164.png)
  7. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -3,14 +3,25 @@
    ![](https://cloud.githubusercontent.com/assets/1711674/8742353/87ddb284-2c32-11e5-9c9b-bca491c8d0e3.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742356/87e025d2-2c32-11e5-8d62-50f9baf4bc81.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742352/87da5f4e-2c32-11e5-8a90-25fc6158e2a3.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742354/87ddfe2e-2c32-11e5-9146-4d10906b745f.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742351/87d3d85e-2c32-11e5-9f6e-7bcf4728d0fd.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742355/87df7934-2c32-11e5-9bc4-e1cc04da5427.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742357/87e8b72e-2c32-11e5-997a-c6d081186da5.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742358/87ee94aa-2c32-11e5-84b7-4819a676129a.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742359/87f1e966-2c32-11e5-9f65-90ae592bf8c0.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742360/87f429c4-2c32-11e5-8535-5a99d5149ff3.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742361/87f7efa0-2c32-11e5-9ece-fbd39411371c.gif)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742362/87fa6654-2c32-11e5-84d6-3ca58dda0a8d.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742363/87fad710-2c32-11e5-8896-7adf1a4cf164.png)
  8. Brent Salisbury revised this gist Jul 17, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Linux NetFilter, IP Tables and Conntrack Diagrams

    ![](https://cloud.githubusercontent.com/assets/1711674/8742353/87ddb284-2c32-11e5-9c9b-bca491c8d0e3.png)
    ---
    ![](https://cloud.githubusercontent.com/assets/1711674/8742356/87e025d2-2c32-11e5-8d62-50f9baf4bc81.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742352/87da5f4e-2c32-11e5-8a90-25fc6158e2a3.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742354/87ddfe2e-2c32-11e5-9146-4d10906b745f.png)
  9. Brent Salisbury created this gist Jul 17, 2015.
    15 changes: 15 additions & 0 deletions Netfilter-IPTables-Diagrams.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Linux NetFilter, IP Tables and Conntrack Diagrams

    ![](https://cloud.githubusercontent.com/assets/1711674/8742353/87ddb284-2c32-11e5-9c9b-bca491c8d0e3.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742356/87e025d2-2c32-11e5-8d62-50f9baf4bc81.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742352/87da5f4e-2c32-11e5-8a90-25fc6158e2a3.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742354/87ddfe2e-2c32-11e5-9146-4d10906b745f.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742351/87d3d85e-2c32-11e5-9f6e-7bcf4728d0fd.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742355/87df7934-2c32-11e5-9bc4-e1cc04da5427.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742357/87e8b72e-2c32-11e5-997a-c6d081186da5.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742358/87ee94aa-2c32-11e5-84b7-4819a676129a.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742359/87f1e966-2c32-11e5-9f65-90ae592bf8c0.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742360/87f429c4-2c32-11e5-8535-5a99d5149ff3.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742361/87f7efa0-2c32-11e5-9ece-fbd39411371c.gif)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742362/87fa6654-2c32-11e5-84d6-3ca58dda0a8d.png)
    ![](https://cloud.githubusercontent.com/assets/1711674/8742363/87fad710-2c32-11e5-8896-7adf1a4cf164.png)