From: "CodeHeads" <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, 24 May 2006 10:34:23 -0500 Bruno Wolff III <[email protected]> wrote:
On Wed, May 24, 2006 at 10:46:39 -0400,
CodeHeads <[email protected]> wrote:
> Thank you, That what I was looking for to verify what I have learned so far.
> Question on entering IP address in IPTables, say I want to add a range to
> block the whole ip range of 10.0.0.0 (example of course)
> Can I do this:
> $iptables -A FORWARD -p tcp -s 10. -i eth0 -j DROP
> $iptables -A FORWARD -p tcp -s 10.* -i eth0 -j DROP
$iptables -A FORWARD -p tcp -s 10.0.0.0/8 -i eth0 -j DROP
$iptables -A FORWARD -p tcp -s 10.0.0.0/255.0.0.0 -i eth0 -j DROP
Thank you Bruno. Just wanted to verify about the wild cards.
Sorry for all the questions, IP's confuse me a bit. :) LOL
Say if I have a range of 220.127.116.11 - 18.104.22.168
Is there a calculator that will tell me the netmask??
There isn't one. The net mask is powers of two. It is often
easier to think of it as 22.214.171.124/11 for the nearest to the
case you site, 126.96.36.199 to 188.8.131.52. That means
255.240.0.0 is the mask.