Why cannot connect to Ubutnu linux machine using Filezilla (ftp)?

I was facing the issue while trying to connect to a newly installed Ubuntu 12.04 running on a Virtual box. I use FileZilla a lot to connect to my linux machine (Virtual machine running on a VirtualBox) for file transfers. My filezilla connection keeps on timing out without much of information.

To investigate the issue try the below steps:

  1. Check if you have a ftp server is installed and running on your linux machine at all.

First let’s check what are the network connections (In and OUT) exist on the linux machine at present:


vbhadra@vbhadra-VirtualBox:~$ netstat -tlpn
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -

FTP usually runs at port 21. As you can see above there is no existing network connection available on port 21 at the moment. Most likely there is no one listening on port 21. So looks like the ftp service on my linux machine is not up yet.

Here are the other possible check you can perform on the linux machine:


vbhadra@vbhadra-VirtualBox:~$ sudo lsof -i:21
vbhadra@vbhadra-VirtualBox:~$ ss -antu
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 *:5353 *:*
udp UNCONN 0 0 127.0.0.1:53 *:*
udp UNCONN 0 0 *:68 *:*
udp UNCONN 0 0 *:46715 *:*
udp UNCONN 0 0 :::5353 :::*
udp UNCONN 0 0 :::56631 :::*
tcp LISTEN 0 5 127.0.0.1:53 *:*
tcp LISTEN 0 128 127.0.0.1:631 *:*
tcp CLOSE-WAIT 1 0 10.222.224.160:37839 91.189.94.25:80

No traces of port 21 above. Again looks like no one is listening on port 21 on the linux machine, hence, when you request for a ftp connection using FileZilla it goes unheard and the FileZilla client times out.

Installing FTP service in Ubuntu

To install the ftp service follow the steps here.

Now check if someone is listening at port 21:

vbhadra@vbhadra-VirtualBox:~$ netstat -tlpn
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -

vbhadra@vbhadra-VirtualBox:~$ sudo lsof -i:21
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
vsftpd 4216 root 3u IPv4 22229 0t0 TCP *:ftp (LISTEN)

vbhadra@vbhadra-VirtualBox:~$ ss -antu
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 *:5353 *:*
udp UNCONN 0 0 127.0.0.1:53 *:*
udp UNCONN 0 0 *:68 *:*
udp UNCONN 0 0 *:46715 *:*
udp UNCONN 0 0 :::5353 :::*
udp UNCONN 0 0 :::56631 :::*
tcp LISTEN 0 32 *:21 *:*
tcp LISTEN 0 5 127.0.0.1:53 *:*
tcp LISTEN 0 128 127.0.0.1:631 *:*
tcp CLOSE-WAIT 1 0 10.222.224.160:37839 91.189.94.25:80
vbhadra@vbhadra-VirtualBox:~$ 

As you see from all the evidences the ftp service is up and running on my linux machine. After this point I could connect to my linux server using FileZilla (ftp mode).

3 thoughts on “Why cannot connect to Ubutnu linux machine using Filezilla (ftp)?

  1. You actually make it appear really easy with your presentation but I find this topic to be actually one thing which I think I’d never understand. It sort of feels too complex and extremely wide for me. I am taking a look forward to your subsequent submit, I will try to get the hang of it!

    Like

  2. I’m no longer positive where you’re getting your information, but great topic. I must spend a while learning more or understanding more. Thank you for magnificent information I used to be searching for this information for my mission.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s