From: Dan Higgins <dhiggins@ngenera.com>
To: netfilter@vger.kernel.org
Subject: Troubles doing transparent proxy for virtual machines
Date: Thu, 27 May 2010 14:39:52 -0500 [thread overview]
Message-ID: <4BFECA88.5040708@ngenera.com> (raw)
Hi iptables gurus. First here is the basic topology:
Internet
|
Gateway
|
Workstation---eth0---virbr0
|
+-----+-----+
| | |
vm1 vm2 vm3
I need to test a traffic analyzer running on my workstation, listening
on some port (say 8990) on eth0.
The rule [I think] I want is "any packets leaving virbr0 going anywhere
to port 80 must instead go to port 8990 on eth0". My software running on
port 8990 does its own check of the NAT packet mangling to push the
packets through after it inspects them.
I've been banging my head on this, with different variants of:
iptables -t nat -A PREROUTING -i virbr0 -p tcp --dport 80 -j DNAT \
--to 10.0.0.10:8990
And I've tried the more generic method of using the mangle table with
--set-mark and ip rule add fwmark, but I'm not getting it.
I guess what's confusing me is that everything runs on the same box.
Thanks for any guidance,
Dan
next reply other threads:[~2010-05-27 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 19:39 Dan Higgins [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-06-03 21:01 Troubles doing transparent proxy for virtual machines Dan Higgins
2010-06-03 21:20 ` Marek Kierdelewicz
2010-06-03 22:59 ` Dan Higgins
2010-06-04 6:27 ` Marek Kierdelewicz
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=4BFECA88.5040708@ngenera.com \
--to=dhiggins@ngenera.com \
--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.