Problem setting up vsftp on ubuntu
I followed the steps to config a ftp server on ubuntu 16.04. At the end, I am not able to connect from remote machine!
Code:
root@ce:/home/ftpuser# ls -l Code:
root@ce:/home/ftpuser# cat /etc/vsftpd.conf Code:
root@ce:/home/ftpuser# ufw status Code:
root@ce:/home/ftpuser# service vsftpd restart |
The default port is 21 if not specified on the command line. Try
ftp hostname 45000 I don't know if the listen port can be within the pasv range. |
No it doesn't help.
The ip address shown in the output of ifconfig is 192.168.168.180. The network admin has defined a valid ip 178.x.y.z which can be accessed from outside world. So, from home, when I ping the hostname, I see 178.x.y.z My question is, should I write 192.... or 178... in pasv_address? |
If trying to access the server from home then you would use
ftp 178.x.y.x 45000 if within the network you can use the local IP address. ftp 192.168.168.180 45000 The firewalls if running on the server and the corporate network need to allow 40000-50000. |
Sorry but my question has not been replied
My question is, should I write 192.... or 178... in pasv_address? |
I would comment it out and let the server use the default.
|
So it is now
Code:
pasv_address= Code:
pasv_max_port= |
Sorry for the misunderstanding. You should comment out the options by using # at the start of the line
Code:
#pasv_max_port= |
So, I also commented listen_port in order to set it to default 21
Code:
#pasv_max_port=40000 Code:
[root@rocks7 ~]# ssh mahmood@192.168.168.180 |
You still have to specify a listen port. If a firewall is running on the server you need to allow traffic on whatever you are using for its listen_port.
Have you tried logging in on the server itself? |
Although I specified a log file name, there is nothing in it
Code:
root@ce:~# service vsftpd restart Code:
root@ce:~# ufw status |
If the server is not headless can you physically sit at its keyboard and login to the ftp server i.e.
ftp localhost |
The server is on vmware. Although I specified ftpuser, what do you think about this?
Code:
root@ce:~# ftp ftpuser@localhost |
The server is only connecting via IPv4 but it is working. Make sure that any firewalls allow ftp traffic.
ftp is not ssh so ftpuser@localhost is not correct syntax. |
The port is open and as I said, ufw is not running
Code:
root@ce:~# ufw status |
All times are GMT -5. The time now is 10:42 AM. |