All ports

Port21/SCTP

ftp

Port

21

Protocol

SCTP

Category

Well-Known

Service

ftp

What is port 21?

Port 21/SCTP is a Well-Known port, assigned by IANA for widely recognized services. It is associated with the ftp service.

FTP

Useful commands

nmapnmap -p 21 -sV example.com
netcatnc -zv example.com 21
curlcurl -v http://example.com:21/
telnettelnet example.com 21
bash(echo > /dev/sctp/example.com/21) 2>/dev/null

Firewall commands

UFWAllow
sudo ufw allow 21/sctp
Deny
sudo ufw deny 21/sctp
iptablesAllow
sudo iptables -A INPUT -p sctp --dport 21 -j ACCEPT
Deny
sudo iptables -D INPUT -p sctp --dport 21 -j ACCEPT
firewalldAllow
sudo firewall-cmd --permanent --add-port=21/sctp
WindowsAllow
netsh advfirewall firewall add rule name="Open Port 21" dir=in action=allow protocol=SCTP localport=21

Security Risks

  • Unauthorized access to the service
  • Data exposure if the service is unauthenticated
  • Outdated versions with vulnerabilities
  • Incorrect service configuration

Frequently Asked Questions

What service runs on port 21/SCTP?

Port 21/SCTP is associated with the ftp service. FTP

Is it safe to expose port 21 to the Internet?

It depends on the service and configuration. Port 21 (ftp) is a Well-Known port. If you need to expose it, keep the service updated, use strong authentication, and configure a firewall. It's always recommended to restrict access by IP when possible.

How do I check if port 21 is open?

You can use nmap: `nmap -p 21 -sV example.com`, netcat: `nc -zv example.com 21`, or the bash command: `(echo > /dev/sctp/example.com/21) 2>/dev/null && echo "Open" || echo "Closed"`.

How do I open or close port 21 on my firewall?

On Linux with UFW: `sudo ufw allow 21/sctp` (open) or `sudo ufw deny 21/sctp` (close). With iptables: `sudo iptables -A INPUT -p sctp --dport 21 -j ACCEPT`. On Windows: `netsh advfirewall firewall add rule name="Open Port 21" dir=in action=allow protocol=SCTP localport=21`.

What applications and services use port 21?

Port 21/SCTP is used by the ftp service. Specific uses depend on the software and configuration. Check our related tools section for more information.

Related ports