Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-2008, 09:43 PM
birch69x@gmail.com
 
Posts: n/a
multiple ip's on one machine and sendmail

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
  #2 (permalink)  
Old 03-04-2008, 12:25 AM
David Schwartz
 
Posts: n/a
Re: multiple ip's on one machine and sendmail

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
  #3 (permalink)  
Old 03-04-2008, 01:53 AM
birch69x@gmail.com
 
Posts: n/a
Re: multiple ip's on one machine and sendmail

> From: David Schwartz <davids@webmaster.com>
> 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
  #4 (permalink)  
Old 03-04-2008, 03:45 AM
D. Stussy
 
Posts: n/a
Re: multiple ip's on one machine and sendmail

<birch69x@gmail.com> wrote in message news:fqia37$c9e$1@netnews.hinet.net...
> > From: David Schwartz <davids@webmaster.com>
> > 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
  #5 (permalink)  
Old 03-04-2008, 07:21 PM
David Schwartz
 
Posts: n/a
Re: multiple ip's on one machine and sendmail

> >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

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Linux Networking


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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



All times are GMT. The time now is 11:47 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Loan | Mobile Phone | Facebook Proxy | Watch Anime Online | Nature's Sunshine



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114