create new tag
, view all tags
Notes and resources for iptables.

iptables is the software that, among other things, lets you set up filtering rules (for firewalls), do NAT, and similar networking related things.

iptables is the default tool for this purpose in the 2.4 kernel. In other kernels:

  • pre 2.2 kernel -- ??? (there was one, at least in something like 2.0)
  • 2.2 kernel -- ipchains
  • 2.4 kernel -- iptables

See AboutThesePages.



Block an IP

If you want to block an ip address only from services that use hosts.deny, add the ip address to /etc/hosts.deny.

If you want to block all network traffic from them, add the address to the iptables rules, something like this:

(from daRcmaTTeR:)

iptables -A INPUT -p tcp --dport 20:10000 -s -j DROP

-A = tells the kernel to append this rule to already existing INPUT table rules

INPUT = name of a table

-p = flag telling the kernel what protocol to apply this rule to. (must be specified when using the "--dport" argument.

tcp = protocol name

--dport = destination port where incoming packet is bound for.

20:10000 = expression specifying all ports from 20 thru 10000

-s = source IP address

-j = target

DROP = what to do with the packet when a match is detected.


See ResourceRecommendations. Feel free to add additional resources to these lists, but please follow the guidelines on ResourceRecommendations including ResourceRecommendations#Guidelines_for_Rating_Resources.


  • (rhk) [[][]] --

Recommended for Specific Needs

  • (rhk) [[][]] --

Recommended by Others

<Currently, no significant content below this line.>

No Recommendation

  • (rhk) [[][]] --

Not Recommended

  • (rhk) [[][]] --


  • () RandyKramer - 15 Jul 2002
  • Michael Viron - 14 Jul 2002
  • daRcmaTTeR - 14 Jul 2002
  • <If you edit this page: add your name here; move this to the next line; and include your comment marker (initials), if you have created one, in parenthesis before your WikiName.>

[[Main.RandyKramer#15 Jul 2002][]]

Page Ratings

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2002-07-16 - RandyKramer
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look