From: Thomas Themel <themel@iwoars.net>
To: "Bewerbungsadresse@web.de" <bewerbungsadresse@web.de>
Cc: netfilter@lists.netfilter.org
Subject: Re: IP-Range and Subnetmask
Date: Wed, 5 Nov 2003 22:42:04 +0100 [thread overview]
Message-ID: <20031105214204.GI30148@iwoars.net> (raw)
In-Reply-To: <3FA969BA.3090908@web.de>
bewerbungsadresse@web.de wrote on 2003-11-05:
> is it possible to prevent spoofing attacks to 172.16.0.0-172.31.255.255
> something like that
> iptables -A INPUT -p tcp -s 172.16.0.0/255.31.0.0 -d $INET_IP -i ppp0 -j
> SPOOFED
>
> but i think the rule above is wrong
It is. Netmasks are comprised of a sequence of 0..* ones followed by a
sequence of 0..* zeroes, which is why you can write them as /nn, nn
being the number of ones.
255.31.0.0 = 1111 1111 0000 1111 0000 0000 0000 0000
What you want is
1111 1111 1111 0000 0000 0000 0000 0000 -> /12 if you want it easy,
255.240.0.0 if you like doing binary conversion.
> so: is it possible at all?
> or do i have to write a loop or all single ip-ranges manually?
Not in this case (since you've got an area that fits exactly into a
/12).
ciao,
--
[*Thomas Themel*] While differing widely in the various little bits we know,
[extended contact] in our infinite ignorance we are all equal.
[info provided in]
[*message header*] - Karl Popper
next prev parent reply other threads:[~2003-11-05 21:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 21:20 IP-Range and Subnetmask Bewerbungsadresse@web.de
2003-11-05 21:42 ` Thomas Themel [this message]
2003-11-07 5:27 ` Mark E. Donaldson
-- strict thread matches above, loose matches on Subject: below --
2003-11-05 21:21 Bewerbungsadresse@web.de
2003-11-06 11:18 Martin Ferrari - Decidir IT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031105214204.GI30148@iwoars.net \
--to=themel@iwoars.net \
--cc=bewerbungsadresse@web.de \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.