inetd passive ftp ports

Hey Y'all

I have a freebsd 8.0 server and i got active FTP working by opening port 20 and 21 on my router. and i was wondering how to restrict the passive ports it uses. I'm using inetd.

-Thanks
 
Don't use inetd. It's more or less a relic from the old days.

The default ftpd deamon isn't configurable with regards to ports.
 
By default ftpd uses data ports from range with set by sysctl variables
Code:
net.inet.ip.portrange.hifirst
net.inet.ip.portrange.hilast
You can set them in /etc/sysctl.conf. Be careful, if you serious restrict them you can get problems with some apps
 
Back
Top