Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Gerry Weaver" <gerryw@objectivedomain.com>
To: netfilter@lists.netfilter.org
Subject: RE: iptables bridge filter question
Date: Thu, 18 Mar 2004 14:12:53 -0600	[thread overview]
Message-ID: <ILECICAFAJIIMPBBLMEAKELJCPAA.gerryw@objectivedomain.com> (raw)
In-Reply-To: <ILECICAFAJIIMPBBLMEAAELECPAA.gerryw@objectivedomain.com>

Hi,

Firstly, thanks for the suggestions. Please let me explain further. I want
to setup an anti-spoofing rule that will block packets coming in on the
external interface, which have a source address of my internal net. The
problem is that I have a router that sits in the external side of the
bridge. I need to stop spoofed packets while still allowing my router.
Shouldn't the following allow my router by mac address and then drop
everything else that's coming in with a source address of my internal net?

EXTERNAL_IFACE="eth0"
INTERNAL_NET="10.10.10.0/24"
ROUTER_MAC="00:00:00:00:00:00"

iptables -N tcp_packets
iptables -N udp_packets

iptables -A INPUT -p tcp -i $EXTERNAL_IFACE -j tcp_packets
iptables -A INPUT -p udp -i $EXTERNAL_IFACE -j udp_packets


iptables -A tcp_packets -i eth0 -m mac --mac-source $ROUTER_MAC -j ACCEPT
iptables -A tcp_packets -p tcp -j DROP -s $INTERNAL_NET -j DROP


iptables -A udp_packets -i eth0 -m mac --mac-source $ROUTER_MAC -j ACCEPT
iptables -A udp_packets -p udp -j DROP -s $INTERNAL_NET -j DROP

Thanks,
Gerry







[Gerry Weaver]  -----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Gerry Weaver
Sent: Thursday, March 18, 2004 2:28 AM
To: netfilter@lists.netfilter.org
Subject: iptables bridge filter question


Hello All,

I have setup a bridging firewall. I want to drop packets on the external
interface, which have source addresses on my internal network. However, the
firewall/bridge sits between my T1 router and the rest of my LAN. Is there a
way to drop the packets mentioned previously, but allow the router? I guess
a rule could be created that uses the routers mac address as a match. I've
been playing around with this, but I'm not getting the result I want. I
could sure use some advice on this.

[ LAN xx.xx.xx.0/24 ]<==>[ bridge/firewall ]<==>[ router xx.xx.xx.254/24 ]


Thanks in advance,
Gerry
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 1/30/2004



  parent reply	other threads:[~2004-03-18 20:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18  8:28 iptables bridge filter question Gerry Weaver
2004-03-18 15:24 ` Antony Stone
2004-03-18 15:33   ` Antony Stone
2004-03-18 19:28     ` Vincent Haverlant
2004-03-18 20:12 ` Gerry Weaver [this message]
2004-03-18 20:40   ` Antony Stone
2004-03-18 23:09     ` Gerry Weaver
2004-03-18 23:16       ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-03-18 15:02 Steve Jones

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=ILECICAFAJIIMPBBLMEAKELJCPAA.gerryw@objectivedomain.com \
    --to=gerryw@objectivedomain.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox