All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcello Scacchetti <marcello.scacchetti@nextrem.it>
To: Saulius Menkevicius <razzmatazz@mail.lt>
Cc: "netfilter@lists.netfilter.org" <netfilter@lists.netfilter.org>
Subject: Re: how to forward packets to another gateway, if i'm one
Date: 17 Dec 2002 15:00:23 +0100	[thread overview]
Message-ID: <1040133623.11478.22.camel@nxitmirms1> (raw)
In-Reply-To: <ISPFE7vXn10A5fpk965000657df@mail.takas.lt>

Hi Saulius,
i think your solution is to use advanced kernel routing options using
the ip tool. This will allow you to use source based routing. route
command allows only setup destination based routes.
I think that http://lartc.org/ will come really in help to you, look for
Linux Advanced Routing & Traffic Control HOWTO.
Hope this helps,

Marcello

Il ven, 2002-12-06 alle 18:28, Saulius Menkevicius ha scritto:
> Hi,
>   I've spend some time searching Google on the topic, however 
> eventually gave up. So..
> 
>   Is there any way of forwarding packets to another gateway, which, 
> besides, is on the same network. Say, I'm on IP 10.0.0.2, and I act 
> as a gateway (ADSL, really) for a number of machines on the same LAN. 
> And there's another such gateway, hooked to another ADSL, which 
> handles connections for another bunch of machines. Essentially the 
> hosts 10.0.0.1 and 10.0.0.2 are identic and perform the same 
> function.
> 
>   Now, I want to make some traffic that comes from some client and 
> that should go through gateway 10.0.0.1 to be forwarded to 10.0.0.2 
> (without any changes). The need is to make the forwarding transparent 
> to both 10.0.0.2 and the client.
> 
>   So it's the way I suppose it should be done:
> 	a) No changes to be made 10.0.0.2's firewalling rules (in fact, it 
> runs FreeBSD);
> 	b) Make 10.0.0.1 to forward them to 10.0.0.2 transparently. 
> 
> _This_is_the_culprit_. I don't know how to make them (packets) go 
> that way. DNAT/SNAT doesn't suit, neither does REDIRECT, as they 
> modify packets they filter.
> 
> 	In FreeBSD, there's ipfw rule fwd, e.g. if 10.0.0.1 ran bsd, i'd 
> type "ipfw add fwd 10.0.0.2 ip from some_client to any". I'm looking 
> for the a way on how to make the same effect on Linux/iptables.
> 	Wrote to much of blurb. Guess I didn't mess it up too much :)
> 
> 	Thanks. 
-- 
Marcello Scacchetti <marcello.scacchetti@nextrem.it>


  reply	other threads:[~2002-12-17 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 17:28 how to forward packets to another gateway, if i'm one Saulius Menkevicius
2002-12-17 14:00 ` Marcello Scacchetti [this message]
2002-12-17 15:16 ` Ben Russo
2002-12-17 16:07 ` Andrea Rossato

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=1040133623.11478.22.camel@nxitmirms1 \
    --to=marcello.scacchetti@nextrem.it \
    --cc=netfilter@lists.netfilter.org \
    --cc=razzmatazz@mail.lt \
    /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.