From: william fitzgerald <wfitzgerald@tssg.org>
To: netfilter@vger.kernel.org
Subject: Can Blocking Reserved RFC1918 and RFC3330 Spoofing be simplified?
Date: Wed, 03 Jun 2009 14:30:28 +0100 [thread overview]
Message-ID: <4A267AF4.9030103@tssg.org> (raw)
Dear all,
If I wanted to block incoming IP address ranges from RFC1918 and RFC3330
must I create rules for each of the reserved addresses along the INPUT
and FORWARD chains?
(It would be around 30plus rules when applying to both INPUT and FORWARD
chains)
Would the following equally work?
Suppose I have an internal class C network 192.168.1.* and imagine I was
running a web server for public use. Interface eth1 is the internet
facing NIC port and eth0 is the internal port NIC.
Could I not just have 2 kinds of rules to block all RFC1918 and RFC3330
spoofed packets.
First KIND: DROP EVERYTHING BY DEFAULT VIA CHAIN POLICY
iptables -P INPUT DROP
iptables -P FORWARD DROP
SECOND KIND: DROP INDIVIDUAL PACKET TYPES
% Rule 1: Drop everything from outside.
iptables -A INPUT -i eth1 -j DROP
% Rule 2: Drop my internal IP range arriving from outside
iptables -A FORWARD -i eth1 -s 192.168.1.0/24 -j DROP
% Rule 3: allow access to web server from all IP addresses.
% note this rule must come after Rule 2.
iptables -A FORWARD -i eth1 -s 0/0 -d 192.168.1.2 -j ACCEPT
% Rule 4: Drop all other packets arriving on the FORWARD chain port eth1
% The default FORWARD Policy SHOULD cover this! But add it just in case.
iptables -A FORWARD -i eth1 -j DROP
kind regards,
Will.
--
________________________________________
William M. Fitzgerald (MSc, BSc)
PhD Student,
Cork Constraint Computation Centre,
Computer Science Dept.,
University College Cork,
Cork,
Ireland.
----------------------------------------
www.williamfitzgerald.net
www.williamfitzgerald.info
www.linkedin.com/in/williamfitzgerald
http://4c.ucc.ie/web/people.jsp?id=143
www.tssg.org/people/wfitzgerald/
________________________________________
reply other threads:[~2009-06-03 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4A267AF4.9030103@tssg.org \
--to=wfitzgerald@tssg.org \
--cc=netfilter@vger.kernel.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.