Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to open the FTP Ports on my server. I have vsftpd installed on the server already. However I am unable to reach the server on ports 20 and 21

Somehow it is allowing me to access port 21 at the moment.

I am running Ubuntu 9.10 (Karmic) I also ran: modprobe ip_conntrack modprobe ip_conntrack_ftp

The following is the iptables -L on my server

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             poseidon.valltek.com tcp dpts:ftp-data:ftp

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  poseidon.valltek.com  anywhere            tcp dpts:ftp-data:ftp

I have been using www.ping.eu/port-chk/ to check the port. Just incase it was an issue with my local machine.

Thanks.

share|improve this question

migrated from stackoverflow.com Aug 9 '10 at 1:02

This question came from our site for professional and enthusiast programmers.

3  
More chance at serverfault –  Enriquev Aug 6 '10 at 17:27

2 Answers 2

In your output chain you're restricting destination ports, should it be source ports instead?

Also, have you checked that there is something listening on the server port?

netstat -n | grep ':2[01]'
share|improve this answer
    
the netstat -n | grep ':2[01]' did the trick. I somehow miss types the port in a config file. Thanks a million –  Anonymous Aug 6 '10 at 17:51
    
Don't forget to pick an answer on here ;) –  Lethargy Aug 6 '10 at 17:57

Maybe having some ambiguity with your question. If you want to use ftp service on your computer,It mainly depends on the form of transmission defined in the remote service.

  1. Port mode:

    The server connect your compute by the 20 port.using

    ~$:iptables -A INPUT -s --sport 20 -j ACCEPT

  2. Passive mode

    The server open the port greater than 1024 to establish the link with client.It is somewhat difficult,you should install models "ip_conntrack,ip_conntrack_ftp" to track the ftp packets.

    more inforemation

share|improve this answer

Your Answer

 
discard

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