From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: iptables dnat, ebtables, mark
Date: Wed, 10 Nov 2004 10:56:43 -0500 [thread overview]
Message-ID: <20041110155643.GA19707@bender.817west.com> (raw)
In-Reply-To: <419236F6.4060306@uplink-verein.ch>
On Wed, Nov 10, 2004 at 04:42:46PM +0100, Moritz Gartenmeister wrote:
> hi
>
> my idea:
> i know the mac-adress from a compromised computer in my lan. i want to
> redirect all the traffic from
> this computer to a webserver (to show up a page with e.g. "bad guy! you got
> a virus").
>
> my system:
> debian testing 2.6.7
> iptables
> ebtables
> bridge-code
>
> my solution so far:
> ebtables -t nat -A PREROUTING -s $MAC -j mark --set-mark 8 --mark-target
> CONTINUE
> there are no other rules in this chain.
> some more rules in -A FORWARD all with -s macadress, but not the one above.
>
> is the only rule in prerouting nat.
> iptables -t nat -A PREROUTING -m mark --mark 0x8 -j DNAT --to-destination
> $IP-WWW
>
> is the first role in the mangle chain.
> iptables -t mangle -A PREROUTING -m mark --mark 0x8 -j ACCEPT
are you filtering packets in MANGLE?
> one check rule in mangl POSTROUTING
> iptables -t mangle -A POSTROUTING -m -mark --makr 0x8 -j LOG --log-prefix
> IPT_MARK
are you getting logs out of this rule? if so--do the src/dst IP's look
like they should?
> my problem:
> the user can access the webserver and only this server, but the user is not
> redirected to the
> web-server, if he tries to access e.g. www.google.com. he only get an
> error-message.
>
> my observation:
> number of packets differ...
> ebtables 213 packets
> prerouting mangle 200 packets
> prerouting nat 118 packets
> postrouting mangle 93 packets
>
> any explanations? the number should be at least the same. i don't
> understand this. the filter-rules
> seem to work properly...
i think you need to describe the relative locations of the client,
bridge, and web server.
it sounds like it could be a routing problem.
-j
--
"I've always wondered if there was a god. And now I know there is --
and it's me."
--The Simpsons
next prev parent reply other threads:[~2004-11-10 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 15:42 iptables dnat, ebtables, mark Moritz Gartenmeister
2004-11-10 15:56 ` Jason Opperisano [this message]
2004-11-10 16:16 ` Moritz Gartenmeister
2004-11-10 16:22 ` Josh Nerius
2004-11-15 14:36 ` Moritz Gartenmeister
-- strict thread matches above, loose matches on Subject: below --
2004-11-10 15:41 Moritz Gartenmeister
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=20041110155643.GA19707@bender.817west.com \
--to=opie@817west.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 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.