Someone elses DNS on my DNS Server

Kenneth Porter shiva at well.com
Fri Dec 22 01:59:59 UTC 2000


On Thu, 21 Dec 2000 18:02:05 -0500, root wrote:

>I have been playing around with Bind 8.2.2 on RedHat 7.0, and I will be
>upgrading it soon.  
>
>Problem:  My company dial-up ISP only allows IPs from their dial-ups to
>use their SMTP server.  We have a different ISP for our T1.  I don't
>want my people to have to keep changing their SMTP settings in their
>clients.  How do I setup my DNS server so that SMTP.ISP1.COM goes to my
>SMTP server, but that the rest of ISP1s DNS<=>IP stays the same?  I
>thought adding an entry to my /etc/hosts would solve the problem, but
>that only worked for the local machine.  

There's a couple of approaches you can take. The first and more general
(IMHO) is to add a CNAME in your local domain to the external server
you want to use. For example:

smtp CNAME smtp.isp1.com.

Then have your clients send mail to just "smtp", and your DNS will
direct them to the right place. If the value changes frequently, use a
very short TTL on this record and update it in your connection script.

The second thing you could do is to provide your own sendmail setup
just for forwarding. Start by looking at
/usr/lib/sendmail-cf/cf/redhat.mc. (There's a README there that
explains the syntax.) This is the "stock" config file that Red Hat uses
for sendmail. Copy it to myhostname.mc, edit it to your tastes, and
"compile" it with make. Then copy the resulting myhostname.cf to
/etc/mail/sendmail.cf and restart sendmail. (DO NOT USE LINUXCONF WITH
SENDMAIL!) For more info on sendmail, consult news:comp.mail.sendmail
and http://www.sendmail.org.

I use the first solution for news (cnaming to my ISP's news server) and
pop3, and the second solution for outbound mail. If I change ISP's, I
only have to change the gateway's DNS records, not any of the clients.

Ken
mailto:shiva at well.com
http://www.sewingwitch.com/ken/





More information about the bind-users mailing list