Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2003 10:30:28 +0000
From:      Matthew Ryan <matt@overdose.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Port Forwarding FreeBSD 4.7_Release
Message-ID:  <F9E1EBA9-5607-11D7-AE54-0030654886A6@overdose.com>

next in thread | raw e-mail | index | archive | help
Hi there,

I've been trying to route packets received on port xxxx via the 
external interface (used by NAT) of my FreeBSD gateway to the same port 
on a local machine.

The manual would seem to make this simple stuff - I have added the 
following line to /etc/rc.conf:

natd_flags="-redirect_port tcp 192.168.1.241:xxxx xxxx"

accessing this service on the local machine via the local address is 
fine but a port scan from the outside, reveals that the relevant ports 
appear closed still. Needless to say - the service is unavailable.

I have tried entering the following on the command line (with and 
without the /etc/rc.conf flag):

natd -redirect_port tcp 192.168.1.241:xxxx xxxx

but here's what i get:

natd: aliasing address not given

I have tried adding the external address as follows but to no avail:

natd -redirect_port tcp 192.168.1.241:xxxx XXX.XXX.XXX.XXX:xxxx

To avoid confusion I am running with an open firewall - rules below:

gatewayb# ipfw list
00050 divert 8668 ip from any to any via ep0
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
65000 allow ip from any to any
65535 deny ip from any to any

I have read quite a few mails from people finding the same problem but 
not yet found an answer.
My guess is that I am missing something simple but i've been banging 
away at this for a while now and no joy.

Any advice would be appreciated.

Thanks

Matthew Ryan

Matt@overdose.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?F9E1EBA9-5607-11D7-AE54-0030654886A6>