Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Direction to me in publish FTP server

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      cutiNEt
      last edited by

      Hi all,
      I got a trouble with pfsense when publishing a FTP server. I configured a FTP server (using vsftp) in my local network and it's working fine, but when i publish to internet client, it dosent work. For my situation, the FTP server ip is 192.168.1.10, in pfsense i made a rule for that machine, then i configured NAT for that one at port 21, but internet client cannot access to the FTP server. How do I troubleshoot this problem?? I'm new at pfsense so plz tell me more detail about the solution

      Thx all with any helping,

      1 Reply Last reply Reply Quote 0
      • D Offline
        ders
        last edited by

        Hello,

        I had similar problems, the solution on my system was to define the pasv_address in your vsftp.conf.
        It is mendatory, that this address is your WAN-IP.
        I found a script which put my WAN address in to this config file once a day.
        Every night at 2a.m. my PFSense is restarting the wan connection and five munutes later a cron job will run this script.

        #!/bin/sh
        #vsftpd.conf IP update
        
        vsftpd_conf=/usr/local/etc/vsftpd.conf
        vsftpd_log=/var/log/vsftpd.log
        
        my_ip=`host your-dyndns-address | cut -f4 -d" "`
        vsftpd_ip=`grep pasv_address $vsftpd_conf | cut -f2 -d=`
        
        if [ "$my_ip" != "$vsftpd_ip" ] ; then
        ( echo ",s/$vsftpd_ip/$my_ip/g" && echo w ) | ed - $vsftpd_conf
        echo `date` "$vsftpd_conf updated with $my_ip IP address" >> $vsftpd_log
        /etc/rc.d/inetd restart >> $vsftpd_log
        fi
        
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.