From owner-freebsd-newbies Tue Aug 14 22:40:38 2001 Delivered-To: freebsd-newbies@freebsd.org Received: from mail.ideal.net.au (ion.ideal.net.au [203.20.241.5]) by hub.freebsd.org (Postfix) with ESMTP id 4265E37B409 for ; Tue, 14 Aug 2001 22:40:19 -0700 (PDT) (envelope-from peter@ideal.net.au) Received: from carbon.ideal.net.au (carbon.staff.ideal.net.au [202.3.35.6]) by mail.ideal.net.au (8.9.3/8.9.3) with ESMTP id PAA34473; Wed, 15 Aug 2001 15:40:00 +1000 (EST) (envelope-from peter@ideal.net.au) Message-Id: <5.1.0.14.2.20010815153024.0224fcc0@mail.ideal.net.au> X-Sender: peter@mail.ideal.net.au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 15 Aug 2001 15:39:59 +1000 To: Adam LaBarge From: Peter MacGee Subject: Re: port forwarding with natd Cc: freebsd-newbies@FreeBSD.ORG In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_513315078==_.ALT" Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --=====================_513315078==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed Hi Adam, At 10:14 PM 14/08/2001 -0700, you wrote: >Hi, I am trying to forward port 25 from a FreeBSD router, running natd >with an open firewall to an internal machine running FreeBSD set up as a >sendmail server. So, I have tried two ways to forward this port, but can >not get it to work. Way 1) in /etc/natd.conf I added the line >permanent_link tcp internalmachineaddress:25 0:0 25 >way 2) was from the command line, and that just hung, this is what I could >figure best. >natd -redirect_port internalmachne:25 myIP:25 25 >That would hang, not even a sintax error. I know that natd runs great, i >have been using this router for about 8 month now, works great. The only >open connection port to the router is 22. all other tcp is passed to the >machines inside. I know that sendmail is working ok on the internal >sendmail server, i telnet to port 25 and it give me the sendmail info. I >just used the defualt sendmail set up. I also know that the domain >information is set up coorectly. So, i figure it is just the forwarding >of the port that is messing things up. If anyones has done this, or knows >any way to get it working. please help, it is driving me mad. thanks I use a program called netcat (/usr/ports/net/netcat). It does exactly what you want to do if you want to use it as a temporary fix until you find the correct way to do things using natd. Netcat is very simple to get going as well... Install and then add/alter the relevant line in your inetd.conf file eg. smtp stream tcp nowait nobody /usr/sbin/nc nc xxx.xxx.xxx.xxx 25 where xxx.xxx.xxx.xxx is your internal machine. After this has been done, give (as root): killall -HUP inetd and everything should be happening happily. I use this particular set up for "forwarding" port 80 requests made to my FreeBSD "router" to a machine on my internal network. Hope this helps, Pete. >-adam > > >Software is just frozen thought. Nothing more, nothing less. > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-newbies" in the body of the message -- Computers are just like air conditioners; They don't work properly if you open Windows. --=====================_513315078==_.ALT Content-Type: text/html; charset="us-ascii" Hi Adam,

At 10:14 PM 14/08/2001 -0700, you wrote:
Hi, I am trying to forward port 25 from a FreeBSD router, running natd
with an open firewall to an internal machine running FreeBSD set up as a
sendmail server.  So, I have tried two ways to forward this port, but can
not get it to work.  Way 1)  in /etc/natd.conf I added the line
permanent_link tcp internalmachineaddress:25 0:0 25
way 2) was from the command line, and that just hung, this is what I could
figure best.
natd -redirect_port internalmachne:25 myIP:25 25
That would hang, not even a sintax error.  I know that natd runs great, i
have been using this router for about 8 month now, works great.  The only
open connection port to the router is 22.  all other tcp is passed to the
machines inside.  I know that sendmail is working ok on the internal
sendmail server, i telnet to port 25 and it give me the sendmail info.  I
just used the defualt sendmail set up.  I also know that the domain
information is set up coorectly.  So, i figure it is just the forwarding
of the port that is messing things up.  If anyones has done this, or knows
any way to get it working.  please help, it is driving me mad.  thanks

I use a program called netcat (/usr/ports/net/netcat). It does exactly what you want to do if you want to use it as a temporary fix until you find the correct way to do things using natd.

Netcat is very simple to get going as well... Install and then add/alter the relevant line in your inetd.conf file  eg.

smtp    stream  tcp     nowait  nobody  /usr/sbin/nc            nc xxx.xxx.xxx.xxx 25

where xxx.xxx.xxx.xxx is your internal machine. After this has been done, give (as root):
killall -HUP inetd
and everything should be happening happily.

I use this particular set up for "forwarding" port 80 requests made to my FreeBSD "router" to a machine on my internal network.

Hope this helps,

Pete.

-adam


Software is just frozen thought.  Nothing more, nothing less.


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

--
Computers are just like air conditioners; They don't work properly if you open Windows. --=====================_513315078==_.ALT-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message