Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Network Services»FTP»What is Active FTP vs Passive FTP (A Definitive Explanation)

    What is Active FTP vs Passive FTP (A Definitive Explanation)

    RahulBy RahulFebruary 10, 20143 Mins ReadUpdated:August 4, 2017

    FTP (File Transfer Protocol) is TCP based service. FTP is widely used for transferring files over a network. There are various FTP servers are available to use like vsftpd, proftpd, pureftpd etc.

    FTP uses two different ports –

    1. Port 20 is used for data port, But the data port is not always on 20 port. It may change in passive mode.
    2. Port 21 is used as command port.

    FTP works in two different modes Active FTP and Passive FTP as per server and client configuration. In this article, I am trying to define Active FTP vs Passive FTP a definitive explanation, I hope this will help you to understand its working.

    Active FTP

    In Active mode FTP the client connects from any random unprivileged port ( For example ‘X’ ( greater than 1023 ) ) to FTP Server port 21. Client again sends ‘X+1’ port to FTP server which is acknowledged on command channel. After that FTP server opens data channel on port 20 to Clients port X+1.

    • FTP client opens up command channel from client on port 1050 (1050 is for example only) to server port 21.
    • FTP client sends PORT 1051 (1050 + 1) to FTP server and server acknowledges on command channel.
    • FTP Server opens up data channel from server port 20 to client port 1051.
    • FTP client acknowledges on data channel.

    Passive FTP

    In Passive mode FTP the client connects from any random unprivileged port (For example ‘X’ (greater than 1023)) to FTP Server port 21. After that client sends a PASV signal to FTP server command channel to inform server for using passive mode. FTP server sends back on a unprivileged port (For example ‘Y’ (greater than 1023)). Now FTP client opens data channel on ‘X+1’ to FTP server PORT ‘Y’. Which acknowledges by FTP server.

    • FTP client opens up command channel from client on port 1050 (1050 is for example only) to server port 21.
    • FTP client sends PASV command to server on command channel.
    • FTP server sends back (on command channel) PORT 1250 (1250 for example only) after starting to listen on that port.
    • FTP client opens up data channel from client 1051 to server port 1250.
    • FTP server acknowledges on data channel.

    I hope above details may help you understand the difference between Active FTP vs Passive FTP, We are waiting for your comments for this article is helpful or not helpful for you. Read our next article, how to download and upload files with ftp.

    active-ftp FTP ftp modes passive-ftp
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleCut Command in Linux with Examples
    Next Article How to Create a WebSite/AppPool in IIS using Command

    Related Posts

    10 Best Linux FTP Clients in 2022

    5 Mins Read

    How To Setup FTP Server with VSFTPD on Ubuntu 20.04

    Updated:July 15, 20215 Mins Read

    How to Create SFTP Only User in Ubuntu & Debian

    Updated:July 7, 20213 Mins Read

    How to Download and Upload Files with SFTP Securely

    Updated:March 11, 20173 Mins Read

    How to Recursively Download Files from FTP

    Updated:May 14, 20161 Min Read

    How to Enable Password Saving in FileZilla

    1 Min Read

    3 Comments

    1. Amit kumar on August 3, 2017 1:08 pm

      Good post..giving clear views..

      Reply
    2. Web Meetings on December 11, 2016 5:01 pm

      Hey Rahul,

      Thank you for the explanation. I hadn’t understood what a passive FTP was before reading this post. Your writing is clear and easy to understand.

      Thanks,
      Dennis

      Reply
    3. Tim Liu on December 4, 2015 9:13 am

      After reading other articles, this one is the clearest to me. Now I understand completely. Thank you so much. Thumbs up.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.