Re: Does sendmail.cf gets replaced by stable?

2000-02-27 Thread Martin Welk

On Sat, Feb 26, 2000 at 08:38:49PM -0500, Francisco Reyes wrote:

 Apparently that is not the case.

As we are on the -stable list, I speak for stable: I did a cvsup yesterday
to and today made buildworld and installworld and my /etc/sendmail.cf
wasn't replaced by one of those procedures and I haven't configured
something special. (And I haven't seen something like that for more than
three years now - I have seen sendmail's barking update cf files that were
to new because I forgot to disable building and installing sendmail during
making the world and I had updated it meanwhile, but no change of the cf
file itself.)

 According to  another email I got builds a sendmail.cf from
 /usr/src/etc/sendmail/freebsd.mc and installs it.

Maybe, it's something different in -current.

 There seems to be a parameter in /etc/rc.conf where one can
 indicate which ".mc" file to use at make world.

Huh? Sendmail doesn't eat a plain .mc file so it cannot be a runtime
option. Sendmail needs a "compiled" (or hand-written :-) ) cf file.

Same game, perhaps it has changed in -current, as there is also a wrapper
for dealing with other default MTAs then sendmail and sendmail
configuration files move to /etc/mail, IIRR.

Regards,

Martin
-- 
  ,,Oh, there's a lot of opportunities, if you're knowing to take them,
  you know, there's a lot of opportunities, if there aren't
you can make them, make or break them!'' (Tennant/Lowe)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Natd

1999-09-23 Thread Martin Welk

On 24-Sep-99 Joe Gleason wrote:

()  That will be a tricky one, because PC anywhere uses some UDP packets to
()  establish the connection as well as the TCP connection.  As far as the
()  natd setup, all I can say is man natd.

You can configure natd in two ways: to redirect defined UDP and TCP ports
for defined addresses to the same or different UDP or TCP ports on one or
many machines. This is sometimes tricky.

A good starting point is always to read the documentation, especially
ipfirewall(4), ipfw(8), natd(8) and sometimes dummynet(4) to read more
about how the firewall code works and for better and deeper under-
standing. For NAT, you don't need dummynet, but the documentation is
also interesting.

Build a kernel including IPDIVERT, IPFIREWALL and what else you want (look
at the documentation again, and look at the LINT file).

Use the log function of the ipfirewall to see which UDP and TCP ports PC
Anywhere needs, if you can't find anything in the PC Anywhere documentation.
Check carefully, if it works with a connection to a static port or from a
static port or what ever, and then start build a natd configuration and
an ipfw configuration.

Some examples, fragments from a working setup I changed a little:

First, we define an alias address on the "world" interface, which is not
necessary, but leaves us open to use any ports on the "real" (gateway)
machine:

ifconfig x0 inet a.b.c.d netmask m.n.o.p
ifconfig x0 alias a.b.c.d+1 netmask m.n.o.p
ifconfig x1 alias e.f.g.h netmask q.r.s.t

...and let's assume that your internal host ist e.f.g.h+1

(Usually, you do this in /etc/rc.conf.)

Some natd configuration:

port 8668
deny_incoming no
alias_address a+b+c+d   (*)
redirect_address e.f.g.h+1 a.b.c.d+1  (**)

(*)  This will be the alias address natd uses for connections coming from
 the LAN interface (x1) to foreign hosts. It depends on your setup,
 which one makes more sense - I'm using a second x0 alias for this
 purpose

(**) You can also use the redirect_port command to redirect special
 services. I hardly recommend this especially if there's a Windows
 box behind the NAT host. Take care, natd uses a syntax like
 "local_addr public_addr", not vice versa, which would have
 expected. Read the man page :-)

Some ipfw configuration:   
   
ipfw add n allow all from any to a.b.c.d

ipfw add n++ divert 8668 all from any to a.b.c.d+1
ipfw add n++ divert 8668 all from e.f.h.h+1 to any

ipfw add n++ allow all from any to any

With this fragments you should be able to build a setup with which you
can reach your Windows box with the alias IP from the outside. I think
this is a good starting point for understanding what the firewall does.

From now, you have to trigger it so that it does exactly as you need,
I mean, redirect special ports and so on. Use the logging functions
of natd, ipfirewall and perhaps a tcpdump to find out what happens
on your network. This will give you enough diagnostics information
to see what firewall rule still is missing or what the software you're
using needs in addition.

Have fun :-)

Regards,

Martin
-- 
FreibergNet Systemhaus GbR   Martin Welk * Sales, Support
Systemhaus für Daten- und Netzwerktechnik   phone +49 3731 781387
Unternehmensgruppe Liebscher  Partnerfax +49 3731 781377
D-09599 Freiberg * Am St. Niclas Schacht 13http://www.freibergnet.de/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message