Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: Greg Cope <gregcope@gmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: How to make a mutli-homed host use one IP for a NAT'ed host
Date: Thu, 21 Apr 2005 13:13:20 -0500	[thread overview]
Message-ID: <4267ED40.6040803@riverviewtech.net> (raw)
In-Reply-To: <c0e9781f05042108122c7b02c3@mail.gmail.com>

> No need to appologies - and your up already!

Heh, ya the glorious life of a computer consultant. :)

> So I swapped to eth1 - and it would appear that packets are getting
> marked...

*nod*

> So the last few hurdles...
> 
> I need to use the same router - an ADSL thing as everything else, I
> just want the packets to be sent from a different $MAIL_INET_ALIAS IP
> (as opposed to the usual INET_IP

This makes perfect sense to me and is what I understood you to be wanting.  Now to just get the syntax correct so that it does work.

> However I think these are the sticking points:
> 
> ip route add table $IPROUTE2_SMTP_TABLE dev $INET_IFACE src $MAIL_INET_ALIAS
> ip route add table $IPROUTE2_SMTP_TABLE default via $INET_IP
> 
> I get 
> 
> $ ip route add table smtp.out dev eth0 src 217.154.55.250
> $ ip route add table smtp.out default via 217.154.55.241
> RTNETLINK answers: File exists

You may need to change your device entire in the above rule to be eth0:1 not eth0.  Some testing should tell you this for sure.

> .241 is my internet gateway router, not the default external IP of my
> firewall which is eth0=217.154.55.249. eth0:1=217.154.55.250 which is
> the $MAIL_INET_ALIAS
> 
> Combinations of either of the above mean the mail server cannot
> connect to an exteriror mail server.

Hmm, would it be possible for me to see the full output of your ip route tables and rules prior to what we have done here?  I'd also like to see the output of your iptables rules for the filter, nat, and mangle tables.  This way I can look at the entire picture and hopefully give you the correct info with out having to work with pieces of the information.



Grant. . . .


  reply	other threads:[~2005-04-21 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21  6:52 How to make a mutli-homed host use one IP for a NAT'ed host Greg Cope
2005-04-21  7:17 ` Taylor Grant
     [not found]   ` <c0e9781f05042102544437b319@mail.gmail.com>
2005-04-21 14:18     ` Greg Cope
2005-04-21 14:53       ` Taylor Grant
2005-04-21 15:12         ` Greg Cope
2005-04-21 18:13           ` Taylor, Grant [this message]
2005-04-21 19:07             ` Greg Cope
2005-04-21 19:21               ` Taylor, Grant

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=4267ED40.6040803@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=gregcope@gmail.com \
    --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