Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Jul 2003 08:28:31 -0700
From:      Luke Cowell <lukec@gateway.e-and-s.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: funky dns required
Message-ID:  <BB2EDFAF.32F%lukec@gateway.e-and-s.com>
In-Reply-To: <1057557552.38814.11.camel@athomson.prv.au.itouchnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
If email is your only concern, then there's a much simpler solution. I have
implemented this before and I find it works well. I've only tested this
solution where the smtp server runs on my NAT box (NAT being required is
implicit... Was implicit).

Simply add this line to your nat config

rdr fxp0 0.0.0.0/0 port 25 -> 127.0.0.1 port 25

Where fxp0 is the name of the inside interface on your NAT box. This tells
ipnat to redirect any traffic passing over fxp0 on port to redirect to port
25 of localhost.

Even if this implementation isn't suitable for you, I hope it gives you some
alternate ways of looking at this problem.

You may also want to look at your dhcp config and set up default domains for
internal users.

Luke

On 7/6/03 10:59 PM, "Andrew Thomson" <ajthomson@optushome.com.au> wrote:

> I currently have a caching nameserver on my local domain that really
> just caches and forwards to my primary nameserver.
> 
> A lot of laptop users connect to the public ip of my mailserver as this
> is what they'd use if they were out of the office.
> 
> However when they are in the office, it doesn't work so well. I've got
> some double nat magic on the firewall to attempt to overcome the problem
> however it just doesn't seem to work so well.
> 
> As soon as I change the mailserver to the internal ip for these laptop
> users, everything works great. However having the laptop users change
> this everytime is not a workable solution.
> 
> What I want to do is setup on my caching nameserver something so that
> when the laptop users requests the public name of my mailserver it
> acutally returns the internal ip. Everyone's happy!
> 
> I could make the caching nameserver a master for the public domain of my
> mailserver however I would also have to keep updating every other host
> on the domain.
> 
> Can I change the dns for this one host??
> 
> mailserver.mydomain.com = <public ip>
> mailserver.int.mydomain.com = <private ip>
> 
> And there's lots of other hosts on mydomain.com.
> 
> I want my caching nameserver to resolve mailserver.mydomain.com to
> <private ip> as the only hosts querying this nameserver would be
> internal hosts anyway!
> 
> Can I just be a master for a host???
> 
> zone "mailserver.mydomain.com" {
>       type master;
>       file "master/mailserver.mydomain.com";
> };
> 
> Long winded I know.. hopefully everything's clear!!
> 
> Thanks,
> 
> ajt.
> 
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BB2EDFAF.32F%lukec>