Networking Forums

Networking Forums > Computer Networking > Linux Networking > multiple ip's on one machine and sendmail

Reply
Thread Tools Display Modes

multiple ip's on one machine and sendmail

 
 
birch69x@gmail.com
Guest
Posts: n/a

 
      03-03-2008, 08:43 PM
Ok, I'm totally beat. I've been trying and searching for answers all
day, but I couldn't solve my problem, so I hlpe one of you can help
me. I'm runing RH-9 with kernel 2.4.20. Here is the situation and
what I want to do.

I have to ip's, both have a host name: xxx.com and mail.xxx.com,
respectively. I have only one machine with two ethernet interfaces.
What I want to achieve are as follows:

1) I want the two interfaces to connect to the gateway using the two
different ip's.
2) I want sendmail to listen to the interface associated with the
mail.xxx.com domain and also uses that address when it relay outbound
mails.
3) and I wnat all other traffic, inbound and outbound, to go through
the interface associate with the xxx.com address.

How can I achieve this or is it possible?
Help and thank a bunch!

Biron
 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      03-03-2008, 11:25 PM
On Mar 3, 1:43 pm, birch...@gmail.com wrote:

> I have to ip's, both have a host name: xxx.com and mail.xxx.com,
> respectively. I have only one machine with two ethernet interfaces.


Are those two IPs on the same network or not?

> What I want to achieve are as follows:
>
> 1) I want the two interfaces to connect to the gateway using the two
> different ip's.


That will work just fine if the two IPs are on different networks.

> 2) I want sendmail to listen to the interface associated with the
> mail.xxx.com domain and also uses that address when it relay outbound
> mails.


When you say "use that address", do you really mean to use that
address or to send packets out that interface? These two are not the
same thing.

> 3) and I wnat all other traffic, inbound and outbound, to go through
> the interface associate with the xxx.com address.


> How can I achieve this or is it possible?
> Help and thank a bunch!


Your requirements don't make sense. What is your outer problem? Why do
you want these things? It is quite likely that what you actually need
is better achieved some other way.

You seem to be confusing IP addresses with interfaces. In general,
inbound packets will have whatever address the other machine chose to
use. You can't control that. Outbound packets will have whatever
address the other end chose if they are replies or whatever is closest
if not.

The outbound interface chosen will be the one closest to the
destination. The source address has no affect on the interface chosen,
nor is there any rational reason why it should. The inbound interface
chosen will be the one the other end knows how to get to. The
destination address has no affect on the interface chosen, nor is
there any rational reason why it should (as far as the end system is
concerned).

Addresses that fall inside the same network due to the chosen netmask
must be on the same physical network. Two interfaces on the same
physical network must be bridged or teamed. You can break these rules,
but you need to know exactly what you're doing and it's rarely the
right thing to do.

DS
 
Reply With Quote
 
birch69x@gmail.com
Guest
Posts: n/a

 
      03-04-2008, 12:53 AM
> From: David Schwartz <(E-Mail Removed)>
> Reply to: David Schwartz
> Date: Mon, 3 Mar 2008 16:25:28 -0800 (PST)
>
>On Mar 3, 1:43 pm, birch...@gmail.com wrote:
>
>> What I want to achieve are as follows:
>>
>> 1) I want the two interfaces to connect to the gateway using the two
>> different ip's.

>
>That will work just fine if the two IPs are on different networks.
>


Well, the two ip's are on the same network. I meant to type "connect to
the _same_ gateway, but I missed it.

>> 2) I want sendmail to listen to the interface associated with the
>> mail.xxx.com domain and also uses that address when it relay outbound
>> mails.

>
>When you say "use that address", do you really mean to use that
>address or to send packets out that interface? These two are not the
>same thing.
>


Ok, I'm not too good at these terminologies, so let me explain what I
desire. When people try to connect to my smtp server, they look up the
address from the mx record, so there isn't much of an issue. What I
really want is when I send outgoing mails, say I send an email to your
machine, it would appear the connection is made from mail.xxx.com and its
associated ip address and NOT from xxx.com and its associated ip address.

>> 3) and I wnat all other traffic, inbound and outbound, to go through
>> the interface associate with the xxx.com address.

>
>> How can I achieve this or is it possible?
>> Help and thank a bunch!

>
>Your requirements don't make sense. What is your outer problem? Why do
>you want these things? It is quite likely that what you actually need
>is better achieved some other way.


Because I want mail.xxx.com and its ip address dedicated to the mail
server only, and I want other traffic, whether it is a inbound request to
my web server or my outbound telnet connection, etc., to appear to be made
from xxx.com and its associated address. Does that make sense now?

So is this doable? Thanks!

Biron
 
Reply With Quote
 
D. Stussy
Guest
Posts: n/a

 
      03-04-2008, 02:45 AM
<(E-Mail Removed)> wrote in message news:fqia37$c9e$(E-Mail Removed)...
> > From: David Schwartz <(E-Mail Removed)>
> > Reply to: David Schwartz
> > Date: Mon, 3 Mar 2008 16:25:28 -0800 (PST)
> >
> >On Mar 3, 1:43 pm, birch...@gmail.com wrote:
> >
> >> What I want to achieve are as follows:
> >>
> >> 1) I want the two interfaces to connect to the gateway using the two
> >> different ip's.

> >
> >That will work just fine if the two IPs are on different networks.
> >

>
> Well, the two ip's are on the same network. I meant to type "connect to
> the _same_ gateway, but I missed it.
>
> >> 2) I want sendmail to listen to the interface associated with the
> >> mail.xxx.com domain and also uses that address when it relay outbound
> >> mails.

> >
> >When you say "use that address", do you really mean to use that
> >address or to send packets out that interface? These two are not the
> >same thing.
> >

>
> Ok, I'm not too good at these terminologies, so let me explain what I
> desire. When people try to connect to my smtp server, they look up the
> address from the mx record, so there isn't much of an issue. What I
> really want is when I send outgoing mails, say I send an email to your
> machine, it would appear the connection is made from mail.xxx.com and its
> associated ip address and NOT from xxx.com and its associated ip address.
>
> >> 3) and I wnat all other traffic, inbound and outbound, to go through
> >> the interface associate with the xxx.com address.

> >
> >> How can I achieve this or is it possible?
> >> Help and thank a bunch!

> >
> >Your requirements don't make sense. What is your outer problem? Why do
> >you want these things? It is quite likely that what you actually need
> >is better achieved some other way.

>
> Because I want mail.xxx.com and its ip address dedicated to the mail
> server only, and I want other traffic, whether it is a inbound request to
> my web server or my outbound telnet connection, etc., to appear to be made
> from xxx.com and its associated address. Does that make sense now?
>
> So is this doable? Thanks!


Sendmail M4 configuration option: DAEMON_OPTIONS(`... Modifier=b').
This would have been better asked on comp.mail.sendmail.


 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      03-04-2008, 06:21 PM
> >On Mar 3, 1:43 pm, birch...@gmail.com wrote:
>
> >> What I want to achieve are as follows:

>
> >> 1) I want the two interfaces to connect to the gateway using the two
> >> different ip's.

>
> >That will work just fine if the two IPs are on different networks.


> Well, the two ip's are on the same network. I meant to type "connect to
> the _same_ gateway, but I missed it.


So you have two interfaces to the same network. Are you bridging or
teaming? If not, stop. What you're doing already doesn't make sense.

> >> 2) I want sendmail to listen to the interface associated with the
> >> mail.xxx.com domain and also uses that address when it relay outbound
> >> mails.

>
> >When you say "use that address", do you really mean to use that
> >address or to send packets out that interface? These two are not the
> >same thing.


> Ok, I'm not too good at these terminologies, so let me explain what I
> desire. When people try to connect to my smtp server, they look up the
> address from the mx record, so there isn't much of an issue. What I
> really want is when I send outgoing mails, say I send an email to your
> machine, it would appear the connection is made from mail.xxx.com and its
> associated ip address and NOT from xxx.com and its associated ip address.


Ah, so this has nothing to do with interfaces it all. You simply want
sendmail to bind to a particular source address when it makes outgoing
connections. Google "ClientPortOptions" and the "Addr" sub-option.

> >> 3) and I wnat all other traffic, inbound and outbound, to go through
> >> the interface associate with the xxx.com address.

>
> >> How can I achieve this or is it possible?
> >> Help and thank a bunch!

>
> >Your requirements don't make sense. What is your outer problem? Why do
> >you want these things? It is quite likely that what you actually need
> >is better achieved some other way.


> Because I want mail.xxx.com and its ip address dedicated to the mail
> server only, and I want other traffic, whether it is a inbound request to
> my web server or my outbound telnet connection, etc., to appear to be made
> from xxx.com and its associated address. Does that make sense now?


I think so. Make sure the IP address for xxx.com is primary for the
interface to the network (physical or virtual, whichever one routes to
the network). Add mail.xxx.com as an alias to that network interface.
Configure sendmail to use the mail.xxx.com as its client port's bind
address. Put the mail name in your MX record.

That should do it.

DS
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Servers on one machine Lee Jefferies Windows Networking 5 08-14-2008 12:42 AM
multiple IP addresses on a single machine internetgoo@googlemail.com Linux Networking 8 10-09-2007 03:03 AM
Using multiple BT adapters on one machine? Daniel Wireless Networks 2 10-13-2006 09:09 PM
multiple computer names on one machine Joeri KUMBRUCK Windows Networking 2 06-14-2004 05:56 PM
How to set up a linux machine with multiple NICs as a hub/swich? Asfand Yar Qazi Linux Networking 2 03-04-2004 11:42 PM



1 2 3 4 5 6 7 8 9 10 11