ftp problem -ipfw with natd

Chuck Swiger cswiger at mac.com
Thu Oct 13 08:32:40 PDT 2005


Efren Bravo wrote:
> Hi,
> 
> I've problem with ipfw with natd to access from internal network to
> internet ftp sites. From fbsd box i can access to ftp sites.
> 
> vr0 = out interface
> 6.34.60.15 = mi pc (winXP)
> 8668 = natd <== Why on this rule ntad is tranlated to 8668?
> 
> My rules:
> ---------
> ...
> 00070 divert 8668 ip from any to any in via vr0

8668 is a local port which is commonly used for IPFW to redirect or divert 
traffic to natd, which is listening there.  You can change IPFW and natd to use 
another port number, which can even be useful if you want to run two copies of 
natd.

Anyway, to get FTP to work right through natd, you either need to use PASV 
(passive-mode FTP), or you need to put a punch_fw rule in your natd config 
file, like so:

punch_fw 10000:1000

...where 10000 is the starting rule number, and may need to be adjusted 
depending on your IPFW ruleset.

-- 
-Chuck



More information about the freebsd-questions mailing list