Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Julien <dyna@tri-oxyde.org>
To: netfilter@lists.netfilter.org
Subject: Re: routing mail on a different gateway
Date: Fri, 23 Jul 2004 12:07:33 +0200	[thread overview]
Message-ID: <4100E365.7030906@tri-oxyde.org> (raw)
In-Reply-To: <20040723083455.GC7773@jgomez-p-latitude.asia.unity>

Julian Gomez wrote:

>On Fri, Jul 23, 2004 at 10:25:11AM +0200, Julien spoke thusly:
>
>  
>
>>Good Morning,
>>
>>I have a linux box with two dsl modems on it (connection is done via
>>pppoe), I'm trying to route default traffic on the primary connection
>>(ppp0) and mail traffic on another one (ppp1).
>>
>>This traffic should be able to come from the localhost or the lan via
>>NAT.
>>
>>I run Slackware 9.1 (Kernel 2.4.22), recompiled with necessary options
>>for using iproute2.
>>    
>>
>
>Okay. Do you have corresponding OUTPUT / FORWARD rules defined
>
Thanks to your hint, I found that I (silly) forgot to set output rules 
for ppp1. Now I can do that (that was not working before, packets were 
dropped)

ip route add to 213.41.143.209 via [gateway_ip] dev ppp1

and all traffic to 213.41.143.209 goes through ppp1.

But routing mail traffic on second gateway still doesn't work as I would 
like : packets are not dropped but mail traffic still goes through ppp0. 
Here is the output of ip route :

62.4.16.226 dev ppp0  proto kernel  scope link  src 62.212.120.196
193.253.160.3 dev ppp1  proto kernel  scope link  src 80.14.101.245
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.200
127.0.0.0/8 dev lo  scope link
default via 62.4.16.226 dev ppp0

62.212.120.196 is first isp's assigned ip
62.4.16.226 is first isp's gateway
193.253.160.3 is second isp's gateway
80.14.101.245 is second isp's ip (dynamic)

And the output from ip rule ls :
0:      from all lookup local
32765:  from all fwmark 0x1 lookup mail.out
32766:  from all lookup main
32767:  from all lookup default

Is there a way to check if packets are correctly marked ?

Thanks, Julien.



  reply	other threads:[~2004-07-23 10:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23  8:25 routing mail on a different gateway Julien
2004-07-23  8:34 ` Julian Gomez
2004-07-23 10:07   ` Julien [this message]
     [not found] ` <004801c47093$c781ea20$e68923d4@shark.ro>
2004-07-23 10:09   ` Julien
2004-07-23 12:33 ` Julien
2004-07-23 12:50   ` Rob Sterenborg
2004-07-23 12:56     ` Julien
2004-07-23 13:54       ` Rob Sterenborg
  -- strict thread matches above, loose matches on Subject: below --
2004-07-23 12:54 Julien
2004-07-23  8:15 Julien

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=4100E365.7030906@tri-oxyde.org \
    --to=dyna@tri-oxyde.org \
    --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