Freenas service proftpd conf file

bluecolor

Dabbler
Joined
Nov 3, 2012
Messages
23
hi.

I have to make change proftpd.conf
I can connect ssh and change with proftpd.conf.
and service restart proftpd
the change is canceled.


I'm making changes with the nano editor on freenas shell. the result is the same.

it becomes outdated when I restart the service.

I need help.








FreeNAS-11.3-U3.2
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
FreeNAS protects the proftpd.conf, so any edits to it via nano are overwritten from the master copy in the FreeNAS database. To have your changes stick, add your additional configuration to the Auxiliary parameters field in the FTP service UI:

1594473242574.png


This will inject your changes properly into the master copy in the database.
 

bluecolor

Dabbler
Joined
Nov 3, 2012
Messages
23
hi.
1.png


config file active modules do not change when i do this.

sample add parameters

UseIPv6 off
<IfModule mod_ban.c>
BanEngine on
BanControlsACLs all allow group wheel
BanLog /var/log/proftpd/ban.log
BanMessage Host %a has been banned
BanOnEvent MaxLoginAttempts 2/00:10:00 01:00:00
# -m "mod_ban/rule"
# -v "concat(' BanOnEvent ',event,' ',occurrence,'/',timeinterval,' ',expire)" -n
# -b
BanTable /var/run/proftpd/ban.tab
</IfModule>


Config file

ServerName "freenas FTP Server"
ServerType standalone
DefaultServer on
DefaultAddress localhost
UseIPv6 on
Port 21
User nobody
Group nogroup
Umask 006 002
SyslogFacility ftp
MultilineRFC2228 off
DisplayLogin /var/run/proftpd/proftpd.motd
DeferWelcome off
TimeoutIdle 600
TimeoutLogin 300
TimeoutNoTransfer 300
TimeoutStalled 3600
MaxInstances none
MaxClients 10
MaxConnectionsPerHost 10
MaxLoginAttempts 10
DefaultTransferMode ascii
AllowForeignAddress off
IdentLookups off
UseReverseDNS off
PassivePorts 50000 50100

<Limit LOGIN>
AllowAll
</Limit>

<Global>
RequireValidShell off
DefaultRoot ~ !wheel
AllowOverwrite on
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
TimesGMT off
</Global>


<IfModule mod_ban.c>
BanEngine off
BanControlsACLs all allow group wheel
BanLog /var/log/proftpd/ban.log
BanMessage Host %a has been banned
# -m "mod_ban/rule"
# -v "concat(' BanOnEvent ',event,' ',occurrence,'/',timeinterval,' ',expire)" -n
# -b
BanTable /var/run/proftpd/ban.tab
</IfModule>

UseIPv6 off


<IfModule mod_ban.c>
BanEngine on
BanControlsACLs all allow group wheel
BanLog /var/log/proftpd/ban.log
BanMessage Host %a has been banned
BanOnEvent MaxLoginAttempts 2/00:10:00 01:00:00
# -m "mod_ban/rule"
# -v "concat(' BanOnEvent ',event,' ',occurrence,'/',timeinterval,' ',expire)" -n
# -b
BanTable /var/run/proftpd/ban.tab
</IfModule>

<IfModule mod_delay.c>
DelayEngine on
DelayTable /var/run/proftpd/proftpd.delay
</IfModule>

<IfModule mod_wrap.c>
TCPAccessFiles "/etc/hosts.allow" "/etc/hosts.deny"
TCPAccessSyslogLevels info warn
TCPServiceName ftpd
</ifModule>
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, it's not possible to override the system-defined active modules in the FTP service. If you want a ProFTPd you can control outside the FreeNAS database, you'll need to:
  1. Disable the system FTP service.
  2. Create a generic jail with a different IP from the main system.
  3. Mount the FTP dataset into the jail.
  4. Install ProFTPd inside the jail, and configure as desired.
 
Top