From: "CodeHeads" <codeheads@xxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, 24 May 2006 10:34:23 -0500 Bruno Wolff III <bruno@xxxxxxxx> wrote:
On Wed, May 24, 2006 at 10:46:39 -0400,
CodeHeads <codeheads@xxxxxxxxx> 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 18.104.22.168 - 22.214.171.124
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 126.96.36.199/11 for the nearest to the
case you site, 188.8.131.52 to 184.108.40.206. That means
255.240.0.0 is the mask.