Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem opening port 21 on my Linux Ubuntu server. No matter what i do, i can not get my status to change from closed to open. Here is a recent iptables command i used and the result

iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
nmap -p21-22,25,80,443 CCR1

Starting Nmap 4.53 ( ) at 2012-06-19 03:13 CDT Interesting ports on (


21/tcp  closed ftp
22/tcp  open   ssh
25/tcp  closed smtp
80/tcp  open   http
443/tcp closed https

I also used commands from the advise from this forum

I need to open this for FTP access to the server, and ultimately I need to forward port 21 to 2 domains i am setting up. Thank you for any assistance you can provide -Bob Swaggerty

share|improve this question
Are you using any firewall software? if yes, What is it? – Mitch Jun 19 '12 at 9:20
Do you actually have any software running on port 21 that will respond to the portscan? type: nc localhost 21 on that machine, does it connect the the ftp server? if not. Check your ftp server settings – tomodachi Jun 19 '12 at 11:14

Forward port 21 on your router's Port Forwarding page.

Is your ISP blocking port 21?

Do you use some firewall in your system. If you do, ensure port 21 is open in your firewall.

After doing that retry the procedures in the site you mentioned.

share|improve this answer
port 21 is open on my router, and in the firewall on the server. – Bob Swaggerty Jun 19 '12 at 10:07
Are you using a proxy ? – upapilot Jun 19 '12 at 10:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.