IP Restriction | ![]() |
by Rana Bhattacharyya
Overview
You can either ban or allow IPs to access the FTP server. You can use a limited set of regular expressions (*?[^-]) to specify the allowed/banned IPs.
The IP restrictor component name is ip-restrictor. The configuration parameter - allow-ip specifies whether to allow/deny IPs. IP informations are stored in ip.properties file.
Examples
If allow-ip value is false, the server bans all the specified IPs.
- 123.234.111.* will ban all IPs from 123.234.111.0 to 123.234.111.255
- 123.234.111.22? will ban all IPs from 123.234.111.220 to 123.234.111.229
- 123.234.111.2[1-3]1 will ban 123.234.111.211, 123.234.111.221, 123.234.111.231
- 123.234.111.2[^1-7]1 will ban 123.234.111.201, 123.234.111.281, 123.234.111.291
Similarly, allow-ip=true will only allow the specified IPs.


