Posts Tagged ‘free ftp’

Hi, it has been a while since my last post, but today I’ve gained new knowledge that I wanted to store into this archive of mine. It might be useful to some other people, but it certainly is useful to me. Please enjoy the tutorial, share if you like it and leave a comment if you feel I am wrong (I’ll correct it if its true 😀 )

 Installing the FTP Package

1. Update your repository

yum check-update

2. Install the package

yum -y install vsftpd

3. After installation is done, make a copy of “vsftpd.conf” file

cp /etc/vsftpd/vsftd.conf /etc/vsftpd/vsftpd.conf.bak

4. Edit the configuration file with nano text editor

nano /etc/vsftpd/vsftpd.conf

5. Find this line “anonymous_enable=YES” by pressing CTRL+W and change the value to NO to disable anonymous FTP access.

6. Using the same method as the above find “chroot_local_user=YES” and uncomment it.

7. Add the following to the end of the file

allow_writeable_chroot=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100

8. Restart the VSFTPD service and make it start automatically after reboot

systemctl restart vsftpd.service
systemctl enable vsftpd.service

9. Add the FTP service in the firewall-cmd this is to open the FTP port

firewall-cmd –permanent –add-service=ftp
Firewall-cmd --reload

10. Setup SELinux to allow ftp access to the users home directories.

setsebool -P ftp_home_dir on
setsebool -P allow_ftpd_full_access 1

Create a user and assign the home directory

1. For this tutorial I want to create a user without a home directory therefore I use –M instead of –m.

useradd -M mike –s /sbin/nologin
passwd mike

2. Next is to set the home directory for “mike” by creating a new directory

mkdir /var/www/mike
chmod 755 /var/www/mike

3. Once that is complete point the directory to the user “mike”

chown -R mike /var/www/mike
Advertisements

Hi, before we get started on the tutorial on how to create a “Homemade FTP server” you will need to have the following requirement and if you need a printable version of this tutorial you can get it here :-

  1. A router modem that support DHCP
  2. Knowledge on router configuration
  3. Filezilla Server
  4. Filezilla Client
  5. no-ip account

Make sure you are using the latest FileZilla Server and Client. If you do not have the software required you can download it directly from Filezilla website.

If you have everything in order lets start with the first procedure :-

  1. Creating a domain name
    • what you need to do is go to http://www.no-ip.com/ to register for a free domain name.
    • after you have register your self >login > click on the Host/Redirects tab
    • click on the “Add Host” using the following options, feel free to create you own domain name
    • when you are done with the configuration click on the “Create Host” button
  2. Router configurations :-
    • I am using TP-Link TD-W8960N Modem router, if you are using a different router the configuration should be almost the same as what I am using.
    • First you need to assign your computer/server to a static LAN IP address
    • Then you need to create a “Virtual Server” to point the static LAN address to your server, the Start Port is 21 and the End Port is 21. Use the “TCP/UDP” protocol
      • Click “Apply/Save” after the configuration is done.
    • After creating a “Virtual Server” you need to configure the “Dynamic DNS”. On any router the “Dynamic DNS” settings should appear under the “Advance Setup”.
      • Select “No-IP” as your D-DNS provider
      • Enter your domain name in the Hostname field
      • Make sure you insert the username and password of your “No-IP” account
  3. FileZilla Server Configuration
    • We are almost at the end of our tutorial, just a little bit more you will have your own “FTP server”
    • Click “Edit” > “Settings”
    • When the “FileZilla Server Options” window comes out > select “Passive Mode Settings” > tick the “Retrieve external IP address from:”> fill in your “No-IP host” Domain name e.g: http://no-ip.zapto.org
      • Click “OK” when you are done.
    • Before you can use the server you need to create a “Username” in order for you to access the server, follow the instruction given bellow to create your username
      • Edit > Users
      • Under the “Page” column select “General”
      • Under the “Users” column click “Add” button
      • Enter the username that you desired and click “Ok”
    • When you are done with the “Users” settings, you need to setup the Shared folders
      • Under the “Page” column select “Shared folders”
      • Under the “Shared folders” column click “Add” to add the folder that you want to share
  4. Done! its finish now you have your own at home FTP server, using the filezilla client you can access your server from anywhere as long as you have an internet connection. If this tutorial is useful please donate USD1 for my study fund thanks!