Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Gáspár Lajos" <swifty@freemail.hu>
To: former03|Baltasar Cevc <baltasar.cevc@former03.de>
Cc: Marek Zachara <marek.zachara@telperion.pl>,
	netfilter@lists.netfilter.org
Subject: Re: Problem with router connected to two ISPs (connection marking?)
Date: Thu, 10 Aug 2006 17:04:47 +0200	[thread overview]
Message-ID: <44DB4B0F.2070909@freemail.hu> (raw)
In-Reply-To: <3b37c573ddc16140d97b8e68d15aa489@former03.de>

former03 | Baltasar Cevc írta:
>
> On 09.08.2006, at 14:35, Marek Zachara wrote:
>
>>>
>>> Maybe these lines will help you... :) But if not.... :D
>>>
>>> $IPT -t nat -A POSTROUTING -j SNAT -p tcp --dport www -d $WWW
>>> --to-source $MY_IP
>>> $IPT -t nat -A POSTROUTING -j SNAT -p tcp --dport www -d $WWW
>>> --to-source $MY_IP
>>>
Sorry... That was a misstype and also a missunderstood ...

Try these lines:

$IPT -t mangle -A PREROUTING -j CONNMARK -p tcp --dport www -d $WWW1 
--set-mark 1
$IPT -t mangle -A PREROUTING -j CONNMARK -p tcp --dport www -d $WWW2 
--set-mark 2

$IPT -t nat -A PREROUTING -j DNAT -i eth0 -m connmark --mark 1 
--to-destination $INT_WWW
$IPT -t nat -A PREROUTING -j DNAT -i eth0 -m connmark --mark 2 
--to-destination $INT_WWW

$IPT -t nat -A POSTROUTING -j SNAT -o eth0 -m connmark --mark 1 
--to-source $EXT_WWW1
$IPT -t nat -A POSTROUTING -j SNAT -o eth0 -m connmark --mark 2 
--to-source $EXT_WWW2




  reply	other threads:[~2006-08-10 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08 19:40 Problem with router connected to two ISPs (connection marking?) Marek Zachara
2006-08-09 11:47 ` Gáspár Lajos
2006-08-09 12:35   ` Marek Zachara
2006-08-10 13:12     ` former03 | Baltasar Cevc
2006-08-10 15:04       ` Gáspár Lajos [this message]
2006-08-09 13:50 ` former03 | Baltasar Cevc

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=44DB4B0F.2070909@freemail.hu \
    --to=swifty@freemail.hu \
    --cc=baltasar.cevc@former03.de \
    --cc=marek.zachara@telperion.pl \
    --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