All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michiel Brandenburg <bridge@xepa.nl>
To: t.luettgert@pressestimmen.de
Cc: bridge@lists.osdl.org
Subject: [Bridge] NAT on a bridge (solved sortof)
Date: Mon, 21 Jun 2004 20:17:39 +0200	[thread overview]
Message-ID: <40D72643.5020400@xepa.nl> (raw)

Torsten,

I suffered a similar problem and was wondering if you found a better 
solution to the problem of dnatting on a transparent bridge.

My setup: INTERNET <-> ROUTER <-> (linux)BRIDGE <-> INTERNAL NETWORK

Solution: setup a bridge with ip x.x.x.51 and alias another ip to the 
bridge x.x.x.50 ( using a /16 network at home )  Now get the router to 
send all incomming traffic to .50
DNAT traffic you want on your bridge to .51 and other traffic to say 
.101 Now it works .. very strange, hey works here.

<-------------------- rules ------------------------------>
iptables -t nat -N toZeus
iptables -t nat -I toZeus -m physdev --physdev-in eth1 \
	-s ! x.x.0.0/16 -j DNAT --to x.x.x.51
iptables -t nat -N toHerc
iptables -t nat -I toHerc -m physdev --physdev-in eth1 \
	-s ! x.x.0.0/16 -j DNAT --to x.x.x.101
iptables -t nat -I PREROUTING -p tcp -m multiport  \
	-d x.x.x.50 --destination-ports \ 					 
ftp,sftp,ssh,smtp,ssmtp,http,pop3,pop3s,imap,imaps \
	-j toZeus
iptables -t nat -I PREROUTING -p udp -m multiport \
	-d x.x.x.50 --destination-ports 41111 -j toHerc
iptables -t nat -I PREROUTING -p tcp -m multiport \
	-d x.x.x.50 --destination-ports 41111 -j toHerc
<-------------------- end rules --------------------------->

I just joined this list sorry, if I missed the solution.

Michiel Brandenburg

                 reply	other threads:[~2004-06-21 18:17 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=40D72643.5020400@xepa.nl \
    --to=bridge@xepa.nl \
    --cc=bridge@lists.osdl.org \
    --cc=t.luettgert@pressestimmen.de \
    /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.