F. Instalasi & Konfigurasi FTP Server

 

  1. Prerequisites (Prasyarat)
    1. Topologi Jaringan

      Gambar Topologi Jaringan

       

    2. Konfigurasi Server dan Client
       
      Konfigurasi Server :
      --------------------------------------------------
      - Sistem Operasi        : Linux Debian 10 (Buster)
      - IP Address NIC 1      : DHCP Internet
      - Gateway               : DHCP Internet
      
      - Hostname              : ns100             (Gantilah angka 100 dengan nomer absen anda masing-masing)
      - Domain                : sekolah100.sch.id (Gantilah angka 100 dengan nomer absen anda masing-masing)
      - IP Address NIC 2      : 192.168.100.1/24  (Gantilah angka 100 dengan nomer absen anda masing-masing)
      
      
      Konfigurasi Client :
      --------------------------------------------------
      - Sistem Operasi        : Windows
      - IP Address            : DHCP

     

  2. Seting Server
     
    1. DHCP Server

      Pastikan instalasi dan konfigurasi DHCP server sudah berjalan dengan baik


       
    2. Instalasi dan Konfigurasi FTP Server
       
      • Install paket ProFTPd

        Login sebagai user root

        login as: root
        This email address is being protected from spambots. You need JavaScript enabled to view it..1's password:
        
        Linux ns100 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64
        
        The programs included with the Debian GNU/Linux system are free software;
        the exact distribution terms for each program are described in the
        individual files in /usr/share/doc/*/copyright.

         

        Update repository Debian Buster

        root@ns100:~# cat /etc/apt/sources.list
        
        # buster-updates, previously known as 'volatile'
        # A network mirror was not selected during install.  The following entries
        # are provided as examples, but you should amend them as appropriate
        # for your mirror of choice.
        #
        # deb http://deb.debian.org/debian/ buster-updates main contrib
        # deb-src http://deb.debian.org/debian/ buster-updates main contrib
        
        deb http://mirror.smkn1klaten.sch.id/debian/ buster main contrib non-free
        deb-src http://mirror.smkn1klaten.sch.id/debian/ buster main contrib non-free
        
        deb http://mirror.smkn1klaten.sch.id/debian/ buster-updates main contrib non-free
        deb-src http://mirror.smkn1klaten.sch.id/debian/ buster-updates main contrib non-free
        
        deb http://mirror.smkn1klaten.sch.id/debian-security buster/updates main contrib
        deb-src http://mirror.smkn1klaten.sch.id/debian-security buster/updates main contrib
        
        root@ns100:~# apt update
        
        Get:1 http://mirror.smkn1klaten.sch.id/debian buster InRelease [122 kB]
        Get:2 http://mirror.smkn1klaten.sch.id/debian buster-updates InRelease [51.9 kB]
        Get:3 http://mirror.smkn1klaten.sch.id/debian-security buster/updates InRelease [65.4 kB]
        Ign:4 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main Sources
        Ign:5 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main amd64 Packages
        Ign:6 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main Translation-en
        Get:4 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main Sources [199 kB]
        Get:5 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main amd64 Packages [302 kB]
        Get:6 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main Translation-en [158 kB]
        Fetched 898 kB in 3s (289 kB/s)
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        2 packages can be upgraded. Run 'apt list --upgradable' to see them.
        N: Repository 'http://mirror.smkn1klaten.sch.id/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
        N: Repository 'http://mirror.smkn1klaten.sch.id/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
        N: Repository 'http://mirror.smkn1klaten.sch.id/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
        
        root@ns100:~# apt update --allow-releaseinfo-change
        
        Hit:1 http://mirror.smkn1klaten.sch.id/debian buster InRelease
        Hit:2 http://mirror.smkn1klaten.sch.id/debian buster-updates InRelease
        Hit:3 http://mirror.smkn1klaten.sch.id/debian-security buster/updates InRelease
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        2 packages can be upgraded. Run 'apt list --upgradable' to see them.
        

         

        Upgrade paket

        root@ns100:~# apt upgrade -y
        
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Calculating upgrade... Done
        The following packages will be upgraded:
          libssl1.1 openssl
        2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
        Need to get 2,384 kB of archives.
        After this operation, 2,048 B of additional disk space will be used.
        
        Get:1 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main amd64 libssl1.1 amd64 1.1.1d-0+deb10u7 [1,539 kB]
        Get:2 http://mirror.smkn1klaten.sch.id/debian-security buster/updates/main amd64 openssl amd64 1.1.1d-0+deb10u7 [845 kB]
        Fetched 2,384 kB in 1s (2,676 kB/s)
        Reading changelogs... Done
        Preconfiguring packages ...
        (Reading database ... 32098 files and directories currently installed.)
        Preparing to unpack .../libssl1.1_1.1.1d-0+deb10u7_amd64.deb ...
        Unpacking libssl1.1:amd64 (1.1.1d-0+deb10u7) over (1.1.1d-0+deb10u6) ...
        Preparing to unpack .../openssl_1.1.1d-0+deb10u7_amd64.deb ...
        Unpacking openssl (1.1.1d-0+deb10u7) over (1.1.1d-0+deb10u6) ...
        Setting up libssl1.1:amd64 (1.1.1d-0+deb10u7) ...
        Setting up openssl (1.1.1d-0+deb10u7) ...
        Processing triggers for man-db (2.8.5-2) ...
        Processing triggers for libc-bin (2.28-10) ...
        

         

        Instal paket proftpd

        root@ns100:~# apt install proftpd-basic -y
        
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        The following additional packages will be installed:
          libhiredis0.14 libmemcached11 libmemcachedutil2 proftpd-doc
        Suggested packages:
          openbsd-inetd | inet-superserver proftpd-mod-ldap proftpd-mod-mysql proftpd-mod-odbc
          proftpd-mod-pgsql proftpd-mod-sqlite proftpd-mod-geoip proftpd-mod-snmp
        The following NEW packages will be installed:
          libhiredis0.14 libmemcached11 libmemcachedutil2 proftpd-basic proftpd-doc
        0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
        Need to get 4,498 kB of archives.
        After this operation, 9,616 kB of additional disk space will be used.
        Get:1 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 libhiredis0.14 amd64 0.14.0-3 [33.8 kB]
        Get:2 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 libmemcached11 amd64 1.0.18-4.2 [94.5 kB]
        Get:3 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 libmemcachedutil2 amd64 1.0.18-4.2 [22.3 kB]
        Get:4 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 proftpd-basic amd64 1.3.6-4+deb10u5 [2,652 kB]
        Get:5 http://mirror.smkn1klaten.sch.id/debian buster/main amd64 proftpd-doc all 1.3.6-4+deb10u5 [1,696 kB]
        Fetched 4,498 kB in 2s (2,269 kB/s)
        Selecting previously unselected package libhiredis0.14:amd64.
        (Reading database ... 32098 files and directories currently installed.)
        Preparing to unpack .../libhiredis0.14_0.14.0-3_amd64.deb ...
        Unpacking libhiredis0.14:amd64 (0.14.0-3) ...
        Processing triggers for systemd (241-7~deb10u8) ...
        Processing triggers for man-db (2.8.5-2) ...
        Processing triggers for libc-bin (2.28-10) ...
        

         

      • Konfigurasi user Anonymous

        Anonymous FTP adalah sebuah metode dalam penggunaan program FTP (File Transfer Protocol) yang digunakan untuk masuk (mengakses) sebuah komputer ataupun server tanpa harus memiliki akun terlebih dahulu.

        Aktivitas selanjutnya adalah user dapat menggunakan kata "Anonymous" sebagai username dan password agar bisa masuk kedalam folder atau directory secara anonim.

        Salah satu kegunaan dari Anonymous FTP merupakan cara umum untuk memberikan akses kepada pengguna untuk mengakses sebuah komputer ataupun server agar dapat melihat, mengunduh (download), ataupun mengunggah (upload) file data yang tersedia secara umum (publik).

        root@ns100:~# nano /etc/proftpd/proftpd.conf
        
        #UseIPv6                        on
        UseIPv6                         off
        
        #ServerName                     "Debian"
        ServerName                      "ns100"
        
        
        # Use this to jail all users in their homes
        # DefaultRoot                   ~
        DefaultRoot                   ~
        
        
        # Include other custom configuration files
        Include /etc/proftpd/conf.d/
        
        
        <Anonymous ~ftp>
           User                         ftp
           Group                        nogroup
           UserAlias                    anonymous ftp
           RequireValidShell            off
        </Anonymous>
        
        

         

        Restart service proftp

        root@ns100:~# /etc/init.d/proftpd restart
        
        [ ok ] Restarting proftpd (via systemctl): proftpd.service.

         

        Cek status layanan proftp

        root@ns100:~# /etc/init.d/proftpd status
        
         proftpd.service - LSB: Starts ProFTPD daemon
           Loaded: loaded (/etc/init.d/proftpd; generated)
           Active: active (running) since Thu 2021-08-26 23:55:10 WIB; 57s ago
             Docs: man:systemd-sysv-generator(8)
          Process: 2452 ExecStart=/etc/init.d/proftpd start (code=exited, status=0/SUCCESS)
            Tasks: 1 (limit: 2330)
           Memory: 2.6M
           CGroup: /system.slice/proftpd.service
                   └─2460 proftpd: (accepting connections)
        

         

      • Pengujian FTP menggunakan user Anonymous
         

        Gambar. login FTP menggunakan user anonymous

         

        Gambar. login FTP menggunakan user anonymous

         

        Gambar. user anonymous melakukan upload file

         

        Gambar. user anonymous berhasil dan sukses melakukan upload beberapa file

         

        Gambar. akses FTP menggunakan interface atau antarmuka browser melalui user anonymous

         

         

      • Konfigurasi user Authentication

        Authentication FTP adalah sebuah metode dalam penggunaan program FTP (File Transfer Protocol) yang digunakan untuk masuk (mengakses) sebuah komputer ataupun server yang harus memiliki akun terlebih dahulu.

        root@ns100:~# nano /etc/proftpd/proftpd.conf
        
        
        # Include other custom configuration files
        Include /etc/proftpd/conf.d/
        
        #<Anonymous ~ftp>
        #   User                         ftp
        #   Group                        nogroup
        #   UserAlias                    anonymous ftp
        #   RequireValidShell            off
        #</Anonymous>
        
        
        <Anonymous /home/ftp/siswa100>
           User                         siswa100
           RequireValidShell            off
        </Anonymous>
        
        

         

        Membuat user authentication beserta direktori-nya

        root@ns100:~# mkdir /home/ftp
        
        root@ns100:~# mkdir /home/ftp/siswa100
        
        root@ns100:~# useradd -d /home/ftp/siswa100/ siswa100
        
        root@ns100:~# passwd siswa100
        New password:
        Retype new password:
        passwd: password updated successfully
        
        root@ns100:~# chown -R siswa100:siswa100 /home/ftp/siswa100
        

         

        Restart service proftp

        root@ns100:~# /etc/init.d/proftpd restart
        
        [ ok ] Restarting proftpd (via systemctl): proftpd.service.

         

      • Pengujian FTP dengan user Athentication
         

        Gambar. login FTP menggunakan user Athentication

         

         

    3. Kesimpulan
       

      Selamat! akhirnya kita telah belajar dan berhasil melakukan instalasi dan konfigurasi FTP Server