From cc1f6fbf634aeddafc1ffae2a45e3f539d4177d4 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 11 Dec 2012 14:36:43 +0200 Subject: [PATCH] added workaround for passive mode under NATed network --- install/0.9.7/rhel/vsftpd.conf | 3 +++ install/vst-install.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/install/0.9.7/rhel/vsftpd.conf b/install/0.9.7/rhel/vsftpd.conf index ac5c36b3..a9dd3cdc 100644 --- a/install/0.9.7/rhel/vsftpd.conf +++ b/install/0.9.7/rhel/vsftpd.conf @@ -13,3 +13,6 @@ pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES force_dot_files=YES +pasv_enable=YES +pasv_max_port=12100 +pasv_min_port=12000 diff --git a/install/vst-install.sh b/install/vst-install.sh index 08e4e8bb..9bb7c140 100644 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -575,6 +575,11 @@ wget vestacp.com/notify/?$REPO -O /dev/null # Get server ip vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null) +if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then + # Assign passive ip address + echo "pasv_address=54.246.111.50" >> /etc/vsftpd/vsftpd.conf +fi + if [ -z "$vst_ip" ]; then vst_ip=$main_ip fi