# inetd passive ftp ports



## jjjustjjjay (Feb 17, 2010)

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


----------



## SirDice (Feb 17, 2010)

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.


----------



## Alt (Feb 18, 2010)

By default ftpd uses data ports from range with set by sysctl variables

```
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


----------

