Skip to content

Commit

Permalink
Added info on modules to iptables
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Hermosilla committed Jul 20, 2017
1 parent 7cb1ae8 commit 508e0b6
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion itables-nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Below are the names of the tables that rules are associated with. On web services you
will typically only interact with the filter table.

**List tables**
`ls /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter | grep -Po '(?<=iptable_)[a-z]+'`

- filter
- nat
- mangle
Expand All @@ -20,6 +23,21 @@ will typically only interact with the filter table.
`sudo iptables-save`


## Modules & Extensions
http://ipset.netfilter.org/iptables-extensions.man.html

**List Extensions etc**
`sudo ls /lib/modules/$(uname -r)/kernel/net/netfilter/`

**List modules**
`sudo ls /lib/modules/$(uname -r)/kernel/net/netfilter/xt_* | grep -oP '(?<=xt_)([a-z]+)'`

**Find directory of modules**
`ls $(iptables -m xyz -h 2>&1 | grep -oP '(?<=:)([a-z0-9\/_\-\.]+)' | xargs dirname)`

**Get Help on module**
`iptables -m conntrack -h`

## Throttling, Rate Limiting
- https://www.rackaid.com/blog/how-to-block-ssh-brute-force-attacks/
- https://thelowedown.wordpress.com/2008/07/03/iptables-how-to-use-the-limits-module/
Expand All @@ -38,4 +56,6 @@ will typically only interact with the filter table.
- https://www.tecmint.com/linux-iptables-firewall-rules-examples-commands/
- https://wiki.archlinux.org/index.php/simple_stateful_firewall#Tricking_port_scanners
- https://wiki.archlinux.org/index.php/Sysctl#TCP.2FIP_stack_hardening
- https://danielmiessler.com/study/iptables/
- https://danielmiessler.com/study/iptables/
- https://strongarm.io/blog/linux-firewall-performance-testing/
- https://www.tummy.com/blogs/2005/07/17/some-iptables-modules-you-probably-dont-know-about/

0 comments on commit 508e0b6

Please sign in to comment.