From: Michael Stilmant <ml-netfilter@adtech.be>
To: netfilter@lists.netfilter.org
Subject: transparent tcp proxy
Date: 23 May 2003 17:06:37 +0200 [thread overview]
Message-ID: <1053702396.15028.17.camel@stilmant> (raw)
Hello,
First of all, an hello from a new user on this mailing list.
and finally my actual problem.
I'm need to make a transparent proxy for an billing application. To to
that I need to put myself in the middle point of a protocol exchange not
thinked to be easy done with a proxy.
So to do that I've done this installation:
I've have a computer where I place transparent proxy via ebtables this
is B. (no special rules : just ones to activate a transparent proxy:
brctl addbr mybridge
brctl addif mybridge eth0
brctl addif mybridge eth1
ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0
ifconfig mybridge up
ifconfig mybridge 10.0.0.225
route add default gw 10.0.0.254 )
A and C communicate with all normal exchange
10.0.0.225
+--------+
| B |
+-----+ | | +-----+
| A +-----------[ebtables]----------| C |
+-----+ +--------+ +-----+
10.0.0.3 10.0.0.32
I've place this Iptables rules
iptables -t nat -A PREROUTING -i eth1 -d 10.0.0.3 -p tcp --dport 3435 -j
DNAT --to-destination 10.0.0.225:3625
iptables -t nat -A POSTROUTING -o eth0 -d 10.0.0.3 -p tcp --dport 3435
-j SNAT --to-source 10.0.0.32
so with that when C want to connect the A:3435 service all traffic is
oriented to B and when B send traffic to A: A see C ip address. -> full
transparent.
But there are a big problem:
Address Mac used from B to A is not the MAC address. Not a problem since
i don't want really be transparent but other traffic form C go to A
directly with the good MAC and traffic from B to A have an other MAC. so
switch or other router in the A side see 10.0.0.32 sometime with C Mac
and other time with B MAC .. gloupspss ?? .. :-D
I need to find a way to read mac address from a connection from C and
set this MAC when I start a connection to A from B
have you some clues ? (allready send the same question on the ebtables
ailin list .. perhaps with a function from there there are a solution
... )
thanks
Michael Stilmant
next reply other threads:[~2003-05-23 15:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 15:06 Michael Stilmant [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-24 2:05 transparent tcp proxy George Vieira
2003-05-26 8:45 ` Michael Stilmant
2003-05-27 6:24 ` Joel Newkirk
2003-05-27 7:46 ` Michael Stilmant
2003-05-27 8:34 ` Cedric Blancher
2003-05-27 9:49 ` Michael Stilmant
2003-05-27 10:49 ` Cedric Blancher
2003-05-27 11:48 ` Michael Stilmant
2003-05-27 13:23 ` Cedric Blancher
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=1053702396.15028.17.camel@stilmant \
--to=ml-netfilter@adtech.be \
--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