How to Run an FTP Server from Home with Linux « Null Byte :: WonderHowTo

FileTransferProtocol, orFTP,is a network protocol made for transferring files in a client and host fashion over aTransmissionControlProtocol (TCP) network, such as the internet. FTP is integrated into most browsers, and you have probably used it before. It is a common way to host files and transfer them easily. To access an FTP, a login is required, unless the server is configured to use anonymous logins (like the Arch Linux mirrors).In a home environment, having an FTP server can be a really cool thing. FTP is an easy way to host and share files between all of your computers, and even access your home FTP files when using Wi-Fi away from home. Beware, as FTP is an insecure protocol. A secure alternative isSFTP(SSH File Transfer Protocol).Today inNull Byte, we are going to set up an FTP server daemon on our systems. This will allow us to:Share files over the internet.Share files outside of a Virtual Machine.Escape a chroot.Host your own file repository that can be modified by other users over the internet.RequirementsLinuxRoot privilegesRouter administrator privilegesA router capable of port forwardingSome files to shareStep1Download & Install the DaemonText inboldis a command that must be entered in a terminal emulator.First, we have to install the FTP daemon of our choice. A daemon is just a program or service that runs in the background processes. I usevsftpd(very secure FTP daemon) for my FTP server. It is light on system resources, secure, small in size, and easy to configure.Download the vsftpd source from theofficial website.Change to yourDownloadsdirectory.cd ~/DownloadsConfigure the installation for your system../configureCompile and install vsftpd.make && sudo make installStep2Move Files to the FTP ServerLet's move our music to FTP for the example.sudo cp -R ~/music/* /srv/ftp/Step3Configure & Start the DaemonConfigure the daemon to not allow anonymous logging.From=YESto=NO.Depending on your distro, starting services is a different command. For Ubuntu, it isservice. Arch usesrc.d.sudo rc.d start vsftpdStep4Access the FTP Remotely on a BrowserLet's access our FTP from somewhere outside our network.Enableport forwardingfor port 21.Go towhatismyipand write down your external IP address.Open up an internet browser on a computer from outside of the network and type the following into the address bar.ftp://<ip address>/music/You can also use wget.wget ftp://<ipaddress>/music/Browse your music folder!Have fun playing with your own FTP server! Visit the Null ByteIRCand chat with all of us. You can also follow me onTwitterandGoogle+for updates.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viawebmastersbydesignRelatedHow To:Create a Metasploit Exploit in Few MinutesHow To:Access your computer remotely using DynDNSHow To:Access your home computer remotely with dynamic DNSHow To:Map FTP server shortcuts in the Microsoft Windows 7 ExplorerHow To:Setup FTP on your computer for your Mac Mini serverHow To:Set up an FTP server on a Windows PC with Internet Information Services (IIS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:How to Conduct a Simple Man-in-the-Middle AttackHow To:Use FileZilla to set up an FTP server for your websiteHow To:SSH and FTP into a serverHow To:Set up your FTP server in DreamweaverHow To:Using Hydra 5.4 to crack FTP passwordsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHack Logs and Linux Commands:What's Going On Here?How To:Use Cygwin to Run Linux Apps on WindowsHow To:Create a Custom Arch Linux DistroHow To:Remotely Control Computers Over VNC Securely with SSHHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Create an SSH Tunnel Server and Client in LinuxNews:Server RunningNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:The server timeNews:First Steps of Compiling a Program in LinuxHow To:Run Windows from Inside LinuxHow To:Recover Deleted Files in Linux