04-03-2026
You want a proper FTP server on Kali Linux. The most stable and widely used one is vsftpd (Very Secure FTP Daemon). I’ll give you the clean, correct setup used in real environments.
1. Install FTP Server
Update packages first.
sudo apt update
Install vsftpd
sudo apt install vsftpd -y
Check if it installed:
vsftpd -v
2. Start and Enable FTP Service
Start service:
sudo systemctl start vsftpd
Enable at boot:
sudo systemctl enable vsftpd
Check status:
sudo systemctl status vsftpd
If running correctly you will see active (running).
3. Backup Config (always do this)
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.backup
4. Edit FTP Configuration
Open config file:
sudo nano /etc/vsftpd.conf
Find and set these values.
Allow local users
local_enable=YES
Allow uploads
write_enable=YES
Chroot users to their home directory (security)
chroot_local_user=YES
Allow write inside chroot
Add this line at bottom:
allow_writeable_chroot=YES
Enable passive mode (important for internet access)
Add:
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=40100
Save and exit.
CTRL + X
Y
Enter
5. Restart FTP Server
sudo systemctl restart vsftpd
6. Create FTP User
Never use root for FTP.
Create user:
sudo adduser ftpuser
Example
Username: ftpuser
Password: ********
This user’s FTP folder will be:
/home/ftpuser
7. Allow FTP through Firewall (if enabled)
Check firewall:
sudo ufw status
If active allow FTP:
sudo ufw allow 21/tcp
sudo ufw allow 40000:40100/tcp
8. Find Server IP
ip a
Example:
192.168.1.50
9. Connect to FTP
From another Linux machine
ftp 192.168.1.50
Login:
username: ftpuser
password: ****
Commands inside FTP:
ls
put file.txt
get file.txt
bye
From Windows
Open File Explorer
ftp://192.168.1.50
Enter username and password.
10. Test Upload
Upload file:
put test.txt
Check on server:
/home/ftpuser
What Most Beginners Do Wrong
They:
• forget passive ports
• use root account
• don’t enable write access
• don’t open firewall ports
Then FTP “works but doesn't transfer files”.
If You Want a Hacker / Networking Lab Setup
You should also learn:
- Anonymous FTP
- FTP brute forcing
- FTP misconfigurations
- FTP bounce attack
- FTPS vs SFTP difference
- Packet capture of FTP authentication
These are things real pentesters actually study.
If you want, I can also show you:
"How hackers exploit badly configured FTP servers (real attack techniques)".
Comments
Post a Comment