NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

eton's avatar
eton
Luminary
Jan 28, 2013

FTPS access over WAN?

Setting up a FTP connection over WAN to a ReadyNAS device can be very tricky. After some time I found a solution and posted it here.
But I have noticed that it's possible to login over FTPS locally, but not from outside, from WAN. Strange, parts of this WAN block lives on.
The intersting stuff starts below, in the second post.

At first wehre are all ProFTPd files located? Here:
# find / \( -path '/c' -o -path '/USB' \) -prune -or -iname '*proftpd*' -exec ls -ld {} \;
drwx------ 2 admin admin 16384 Jan 21 14:57 /etc/default/config/etc/frontview/proftpd
-rw------- 1 admin admin 168 Jan 17 2007 /etc/default/config/etc/frontview/usb/access/non-share/proftpd
-rw------- 1 admin admin 162 Jan 17 2007 /etc/default/config/etc/frontview/usb/access/non-share/proftpd.vfat
-rw------- 1 admin admin 159 Jul 11 2006 /etc/default/config/etc/frontview/usb/access/share/proftpd
-rw------- 1 admin admin 153 Jul 11 2006 /etc/default/config/etc/frontview/usb/access/share/proftpd.vfat
-rw-r--r-- 1 admin admin 2006 Apr 8 2009 /etc/default/config/etc/proftpd.conf
-rw-r--r-- 1 root root 211 Jul 11 2006 /etc/default/proftpd
-rwxr-xr-x 1 root root 4200 Jun 5 2008 /etc/init.d/proftpd
drwxr-xr-x 2 admin admin 16384 Jan 21 15:08 /etc/frontview/proftpd
-rw------- 1 admin admin 168 Jan 17 2007 /etc/frontview/usb/access/non-share/proftpd
-rw------- 1 admin admin 162 Jan 17 2007 /etc/frontview/usb/access/non-share/proftpd.vfat
-rw------- 1 admin admin 169 Jan 21 15:08 /etc/frontview/usb/access/share/proftpd
-rw------- 1 admin admin 163 Jan 21 15:08 /etc/frontview/usb/access/share/proftpd.vfat
-rw-r--r-- 1 root root 298 Aug 25 00:55 /etc/pam.d/proftpd
-rw-r--r-- 1 admin admin 2138 Jan 25 22:18 /etc/proftpd.conf
-rwxr-xr-x 1 root root 1139488 Nov 10 2011 /usr/sbin/proftpd
-rw-r--r-- 1 root root 36 Nov 10 2011 /var/lib/dpkg/info/proftpd.list
-rw-r----- 1 root root 15885 Jan 28 14:19 /var/log/proftpd.log
drwxr-xr-x 2 nobody admin 16384 May 22 2008 /var/run/proftpd
srwxrwxrwx 1 root root 0 Jan 25 22:18 /var/run/proftpd.sock
-rw-r--r-- 1 root root 632 Jan 28 14:19 /var/run/proftpd.scoreboard
-rw-r--r-- 1 root root 6 Jan 25 22:18 /var/run/proftpd.pid
-rw-r--r-- 1 root root 6440 Jan 25 22:17 /var/run/proftpd.delay

Active FTP configuration file is /etc/proftpd.conf. It looks like this:
# cat /etc/proftpd.conf
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody/nogroup" and "ftp" for normal operation and anon.
ServerName "NETGEAR ReadyNAS"
ServerType standalone
DeferWelcome off

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
AllowOverwrite on
AllowStoreRestart on
UseReverseDNS off
IdentLookups off
TimesGMT off
WtmpLog off
ServerLog /var/log/proftpd.log
SystemLog /var/log/proftpd.log
TransferLog /var/log/proftpd.log
BanLog /var/log/proftpd.log
MaxLoginAttempts 2
BanEngine on
BanTable /ramfs/ftp_ban.tbl
BanOnEvent MaxLoginAttempts 5/00:10:00 00:15:00

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin welcome.msg
DisplayChdir .message

DenyFilter \*.*/

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
PersistentPasswd on

# Uncomment this if you would use quota module:
#Quotas on

# Port 21 is the standard FTP port.
Port 21
MasqueradeAddress duo
DynMasqRefresh 7200
PassivePorts 49000 49020
AllowForeignAddress on

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory /*>
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022

AllowOverwrite on
</Directory>

Include /etc/frontview/proftpd/ftps.conf
Include /etc/frontview/proftpd/User.conf

And it includes a ftps conf file, /etc/frontview/proftpd/ftps.conf, that reads:
# cat /etc/frontview/proftpd/ftps.conf
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/ftpd/tls.log
TLSProtocol SSLv23

# Are clients required to use FTP over TLS when talking to this server?
TLSRequired off

# Server's certificate
TLSRSACertificateFile /etc/frontview/apache/apache.pem

# Authenticate clients that want to use FTP over TLS?
TLSVerifyClient off

TLSOptions NoSessionReuseRequired

TLSOptions NoSessionReuseRequired
</IfModule>

22 Replies

Replies have been turned off for this discussion

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More