added workaround for passive mode under NATed network

This commit is contained in:
Serghey Rodin 2012-12-11 14:36:43 +02:00
commit cc1f6fbf63
2 changed files with 8 additions and 0 deletions

View file

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

View file

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