Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Feb 2001 11:38:01 +1100
From:      Kal Torak <kaltorak@quake.com.au>
To:        rch@solveinteractive.com
Cc:        Jamie Heckford <heckfordj@psi-domain.co.uk>, freebsd-isp@FreeBSD.ORG
Subject:   Re: diverting incoming packets
Message-ID:  <3A7DF5E9.B660183B@quake.com.au>
References:  <20010204233059.D5290@freefire.trident-uk.co.uk> <20010204185845.A61368@solveinteractive.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Hough wrote:
> 
> Jamie Heckford [heckfordj@psi-domain.co.uk] wrote:
> >
> > redirect all incoming packets to port 25 from any to 192.168.0.6 port 25
> 
> ipfw add divert 25 ip from any to 192.168.0.6
> 
> This might be wrong, but sounds right. :) I would read the ipfw
> man page if I were you though, I'm sure it has the correct syntax.


It is wrong :)

Besides the fact that divert is for something else and you meant
to say fwd, but even that is wrong in this case because he said
he was using natd..

So the correct answer in this case is to do this with natd...
You could do this several ways, but the best I think is to make
a config file for natd...

In /etc/rc.conf put a line saying:

natd_flags="-config /etc/natd.conf"

Or where and what ever you want to call the config file...
Then put all the options you want in the config, each on a
new line...

To do the redirecting you want to put lines in there saying:

redirect_port tcp 192.168.0.6:25 25

If you want to redirect more than tcp traffic, just add more lines
with the protocol you want to redirect... AFAIK you cant redirect
ALL ip connection on a specific port, because ip doesnt have ports,
its the protocols above it that deal with that...

Hope this makes sense :)
Kal.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A7DF5E9.B660183B>