O
O
Optimus2016-11-27 19:49:19
linux
Optimus, 2016-11-27 19:49:19

How to close port 21?

I use sftp but the pentest shows that port 21 is open. What is the best way to close, through iptables or by stopping the ftp service? In the case of a reboot, will it rise again and be opened? What's the best way to do it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
U
Ulrich, 2016-11-28
Pyan @marrk2

SFTP and FTP are two different protocols. The first works via ssh on port 22, and the second on port 21. If no one needs port 21, then it should be closed or even deleted the ftp server

Y
Yuri Chudnovsky, 2016-11-27
@Frankenstine

If you do not need ftp, of course, it is best to remove or at least disable it.

S
Sergey, 2016-11-27
@gangstarcj

Can it be like this

T
Twelfth Doctor, 2016-11-27
@verdex

Add an appropriate rule to the IPTables firewall.
iptables -A INPUT -p tcp --dport 21 -j DROP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question