Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2001 06:37:39 -0700 (PDT)
From:      "K. Greenwood" <k_greenwood1@yahoo.com>
To:        Chris Hastie <lists@oak-wood.co.uk>, freebsd-questions@freebsd.org
Subject:   Re: Port redirection with natd
Message-ID:  <20010820133739.72221.qmail@web14108.mail.yahoo.com>
In-Reply-To: <Zr%2BV%2B$FUjPg7EwEX@chris.oak-wood.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
--- Chris Hastie <lists@oak-wood.co.uk> wrote:
> I'm trying to set up an internet gateway with NAT
> and some port 
> redirection using Free BSD 4.3-CURRENT. The machine
> has two nics, xl0 
> faces the internet and sis0 faces my LAN.
> 
> So far the NAT works fine, but I can't get the port
> redirection going at 
> all.
> 
> The kernel was compiled with:
> 
> |options         IPFIREWALL              # install
> ipfw firewall
> |options         IPFIREWALL_VERBOSE_LIMIT=5 # log
> firewall packets, limit entries
> |options         IPDIVERT                # Allow NAT
> 
> I have this in /etc/rc.conf
> 
> |# -- Configure NAT and Firewall --#
> |firewall_enable="YES"
> |firewall_type="open"   #Close later when I get it
> working!
> |natd_enable="YES"
> |natd_interface="xl0"
> |natd_flags="-f /etc/natd.conf"
> 
> 
> and the natd.conf referenced looks like this
> 
> |dynamic yes
> |redirect_port tcp celandine:25 25
> |redirect_port tcp celandine:119 119
> |redirect_port tcp celandine:3306 3306
> 
> The ports do not seem to being redirected though,
> and I can see no 
> errors at boot up. netstat does not show any of the
> ports in question in 
> use, but an attempt to run
> 
> # natd -n xl0 -f /etc/natd.conf
> 
> returns
> 
> |natd: Unable to bind socket.: Address already in
> use.
> 
> Additionally, I can get no response from any of
> those ports by 
> telnetting to them with another machine.
> 
> Any ideas?

You may also have to set up an alias network address
(ifconfig) on your outside (natd'd) interface with a
real external IP address.  

Then simply set a -redirect_port command according to
man natd.  It appears to work for me.  Good luck.

K. Greenwood

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




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