NAT + sendmail ?

This is a discussion on NAT + sendmail ? within the Linux Security forums, part of the System Security and Security Related category; Hi, I have a problem that : Two RH Linux servers behind the NAT, and both enable the sendmail server. One ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-30-2003
Benson Lei
 
Posts: n/a
Default NAT + sendmail ?

Hi,

I have a problem that :

Two RH Linux servers behind the NAT, and both enable the sendmail server.

One is the Email server with its domain is public domain, say hello.com, the
other wants
to send mail to the Email server, how to achieve that ?

The Email server has public IP address : 199.198.197.196;
after NAT, its IP is : 192.168.10.1

The other sendmail server has public IP address : 199.198.197.195;
after NAT, its IP is : 192.168.10.2

The problem is:
The sendmail server can not find the Email server since it can only find
192.168.10.2,
but this address has no MX record, it can not send email to this address.

How ?




Reply With Quote
  #2 (permalink)  
Old 10-30-2003
Volker Birk
 
Posts: n/a
Default Re: NAT + sendmail ?

Benson Lei <greenb@netvigator.com> wrote:
> Two RH Linux servers behind the NAT, and both enable the sendmail server.
> One is the Email server with its domain is public domain, say hello.com, the
> other wants
> to send mail to the Email server, how to achieve that ?


Implement a DNS server also for the internal network. Than
relay mail.

VB.
--
X-Pie Software GmbH
Postfach 1540, 88334 Bad Waldsee
Phone +49-7524-996806 Fax +49-7524-996807
mailto:vb@x-pie.de http://www.x-pie.de
Reply With Quote
  #3 (permalink)  
Old 10-31-2003
William Park
 
Posts: n/a
Default Re: NAT + sendmail ?

Benson Lei <greenb@netvigator.com> wrote:
> Hi,
>
> I have a problem that :
>
> Two RH Linux servers behind the NAT, and both enable the sendmail server.
>
> One is the Email server with its domain is public domain, say hello.com, the
> other wants
> to send mail to the Email server, how to achieve that ?
>
> The Email server has public IP address : 199.198.197.196;
> after NAT, its IP is : 192.168.10.1
>
> The other sendmail server has public IP address : 199.198.197.195;
> after NAT, its IP is : 192.168.10.2
>
> The problem is:
> The sendmail server can not find the Email server since it can only find
> 192.168.10.2,
> but this address has no MX record, it can not send email to this address.
>
> How ?


You answered your own question. Make sure one server finds MX record of
the other.

--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution for data management and processing.
Reply With Quote
  #4 (permalink)  
Old 10-31-2003
ynotssor
 
Posts: n/a
Default Re: NAT + sendmail ?

"Benson Lei" <greenb@netvigator.com> wrote in message
news:bnr76p$j0i9@imsp212.netvigator.com

> The Email server has public IP address : 199.198.197.196;
> after NAT, its IP is : 192.168.10.1
>
> The other sendmail server has public IP address : 199.198.197.195;
> after NAT, its IP is : 192.168.10.2
>
> The problem is:
> The sendmail server can not find the Email server since it can only
> find 192.168.10.2,
> but this address has no MX record, it can not send email to this
> address.


Both machines needs these entries in /etc/hosts:

127.0.0.1 localhost.localdomain localhost
192.168.10.1 email.example.net email
192.168.10.2 sendmail.example.net sendmail

and in /etc/nsswitch.conf:

hosts: files dns

Of course both machines need a properly configured /etc/resolv.conf that
includes your local (caching) dns if you have one, or else an outside dns
server.

An MX record is not required, as an A record is also acceptable to sendmail.
Your local network is resolved with the use of files rather than dns.


tony

--
use hotmail com for any email replies



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Reply With Quote
  #5 (permalink)  
Old 11-01-2003
Benson Lei
 
Posts: n/a
Default Re: NAT + sendmail ?

Sorry, it does not work, the sendmail can't find the Email Server, it just
want the Email Serve with public IP.

How ?

"ynotssor" <"ynotssor"> ???????:3fa223d4_4@corp.newsgroups.com...
> "Benson Lei" <greenb@netvigator.com> wrote in message
> news:bnr76p$j0i9@imsp212.netvigator.com
>
> > The Email server has public IP address : 199.198.197.196;
> > after NAT, its IP is : 192.168.10.1
> >
> > The other sendmail server has public IP address : 199.198.197.195;
> > after NAT, its IP is : 192.168.10.2
> >
> > The problem is:
> > The sendmail server can not find the Email server since it can only
> > find 192.168.10.2,
> > but this address has no MX record, it can not send email to this
> > address.

>
> Both machines needs these entries in /etc/hosts:
>
> 127.0.0.1 localhost.localdomain localhost
> 192.168.10.1 email.example.net email
> 192.168.10.2 sendmail.example.net sendmail
>
> and in /etc/nsswitch.conf:
>
> hosts: files dns
>
> Of course both machines need a properly configured /etc/resolv.conf that
> includes your local (caching) dns if you have one, or else an outside dns
> server.
>
> An MX record is not required, as an A record is also acceptable to

sendmail.
> Your local network is resolved with the use of files rather than dns.
>
>
> tony
>
> --
> use hotmail com for any email replies
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----



Reply With Quote
Reply
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

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



All times are GMT +1. The time now is 06:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0