issue connect ftp with server linux on google cloud - ftp

I have problem about connect ftp with my server ubuntu throw port 21 at google cloud vm.
i did install vsftp service my ubuntu, and setup rule allow firewall access port 21 on google cloud ,but still can't connect
enter image description here

Do you have selinux or iptables enabled on your server ?. What are the contents of the vsftpd.log file.
Are you able to telnet to your server on port 21 from your local computer ?
Also you need to open more ports in your firewall for the FTP. Port 21 is used for setting up FTP connection, but the data transfer takes place over other ports depending on whether your FTP server is configured in active mode or passive mode.
In active mode, the data transfer takes place over port 20. Active mode is used when the FTP server can connect to the FTP client from port 20. If the client does not allow incoming connections, then passive mode may be used. In Passive mode, the data transfer takes place over a range of ports which is configured on the FTP server. These ports need to be opened on the server.
If your VSFTP server is using Active mode, then you have to open port 20 on the Google Cloud firewall. If your server is using Passive mode then you need to open the ports that are configured on the server for Passive mode.
Read this link for more information on how FTP works: https://en.wikipedia.org/wiki/File_Transfer_Protocol

Related

Filezilla server retrieving directory listing error

I’m trying got configure the filezilla server. I’m running inside a virtual machine of windows 10 where I have installed the filezilla server.
First error I had was “Server sent passive reply with unroutable address” in the client filezilla. Using server address instead.”. What I did to “skip” this error is go to filezilla server and configure passive ports to the range of my ports I will use for ftp 7000-7001. In “Use the following host” I entered my ISP IP, world wide my public address. In the router I configured port forwarding to the port 7000 the ip 192.168.98 that is the address of the windows virtual where is the filezilla server but now I have the error “retrieving directory listing” in the client filezilla.
In the client I also used trying to connect insecure but nothing. Anyway, I don;t want the insecure way because the ftp will have access from systems they don’t have such options. I want all the configurations to fix are made to filezilla server nothing with the client.
What can I do to fix the filezilla server?

Error in VNC server while taking the GUI session of an ec2 instance

I have installed the Tiger VNC server on an ec2 instance. But when I try to connect to the VNC viewer than I get an error:
Unable to connect to the socket: Connection time out (10060)
I have enabled the port 5900 in the security group.
Thanks
VNC Server in:
— User Mode is assigned port 5900 for connections and port 5800 for download requests.
— The first instance of VNC Server in Virtual Mode is assigned port 5901 for connections and port 5801 for download requests. Subsequent instances of VNC Server in Virtual Mode are assigned port numbers incremented by one, where possible, for example 5902, 5903 (and 5802, 5803), and so on.
So you need to open the security group rules for taking the GUi session using VNC viewer.

How does a service such as tunnlr work?

The website says:
Tunnlr uses SSH remote tunneling. It securely connects a port on your
local machine to an open port on our public server. Once you start
your Tunnlr client, the web server on your local machine will be
available to the rest of the world through your special Tunnlr URL.
Could someone please go into a bit more detail over how this entire process works? Or maybe point to something open source that allows the same thing?
The SSH protocol allows tunneling of connections in either direction. So based on the description above here's what is happening:
You download a client program (an SSH client) to your computer and run it.
The client establishes an SSH connection out from your computer to the tunnlr remote server
On the tunnlr server an access port is opened for incoming connections. Let's say port 1234.
Now when anyone connects to tunnlr:1234 the tunnlr server will instruct your client program through the connection established in step 2 to open a connection inside your computer - let's say to port 80 (e.g. you're running a webserver there).
The tunnel connection will now shuffle data between tunnlr:1234 and your_computer:80.
So effectively this is what is running:
[some_remote_computer]<->[tunnlr:1234]<->[SSH tunnel]<->[your_computer:80]
Assume some_remote_computer is your friend or anyone else you want to be able to connect to your local web server.
SSH is available for many platforms (Linux, Windows, OSX and more). You can build such tunnels quite easily with it, but you will of course need access to both computers you want to build the tunnel between. Let's say one computer is your own computer and another is a VPS you've rented (or any other remote server with SSH access). Now you can run exactly the same setup.
The advantage with tunnlr is they manage the remote server for you, and they have a registered hostname you can use for your tunnels.

How I can access FTP server based on different network

I have set up a FTP server with Apache FTP server on local machine, this machine can access internet but its IP address cannot be accessed externally.
I also have another machine in a different city - it can access the internet but it is same in that its IP address cannot be accessed externally. The two computers are not on the same network so they are unable ping each other.
How I can use FTP client from another machine to access the FTP server, I know it should be impossible but do you guys have any workarounds (whatever code change or other approaches)
I am in the US - do you guys have idea how I can make my home IP publicly accessible?
it is very possible if you control the firewall that the server is behind. this is standard network configuration, and you can find hundreds of tutorials online, but the most important bit of information is the firewall, not the ftp server. you configure port forwarding on your firewall to forward incoming ftp requests to your internal ftp server. also, you will want to use "passive" ftp from the client because the client is also behind a firewall.

How to install and configure FTP on amazon Ec2?

i wan to install FTP service on my amazon Ec2 window instance,
i have some questions regarding this.
which is a good FTP demon to install on EC2 service for windows on EC2 instance.
can we install FTP same as we can do on window server with window CD.
any tutorial or videos of installation and configuration FTp on Ec2 server which help we?
kindly help me in this regards. Thanks
Here you will find a great tutorial that explains also the inner workings and problems you might encounter trying to setup an ftp server on amazon EC2 instance.
It also explains why just opening port 21 on the amazon firewall will not work. The example there uses the free filezilla ftp server and client but any can be used.
http://me-ol-blog.blogspot.com/2011/03/how-to-install-ftp-server-on-amazon-aws.html
Edited (24-sep-2013):
Because the best policy practice for stackoverflow says not to rely on links, i copied the info from my blog to here:
How to install an FTP Server on amazon AWS EC2
This seems to be a big issue as people usually waste a lot of time on this.
The problem lies with 2 elements: the security group settings & the ftp server settings.
FTP is not considered a good solution for passing files between EC2 instances and your computer as it is not firewall "friendly" - you can't just open port 21/TCP on the amazon security group settings because the server is actually sitting on a NAT address and when an ftp client connects to an FTP server using PASV mode then the server tells the client which port and which address to use for the data stream (like directory listing).
If you want an alternate easy solution for transferring files between yourself and the EC2 instance then setup a dropbox on both machines - it doesn't get easier than this... :)
If you still want to set up an FTP server on your EC2 instance then read on...
Typically, people just try to open port 21 and then try to connect and get something similar to:
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Response: 425 Can't open data connection.
The solution is (and for this example I will explain how to perform the setting on FileZilla FTP server on windows):
1. FileZilla FTP server: Edit-> settings -> Passive mode settings:
(x) Retrieve external IP from:
http://ip.filezilla-project.org/ip.php
[ this tells the ftp server to perform a 'whatismyip' and give that to the ftp client, you can also specifically put the address DNS name you use in your remote desktop in the "Use the following IP:", e.g., ec2-6-100-129-60.compute-1.amazonaws.com ]
(x) Use custom port range:
1024-1048
[ these are the ports that will be given to the ftp client - we will open them in the following step in the Firewall ]
2. Amazon security groups: open ports -
a. Custom TCP rule , Port range:21
b. Custom TCP rule, Port range:1024-1048
3. Turn off the windows firewall on the EC2 machine (you don't need it - you have the amazon firewall)
That's it, and just as side note, you don't need to use Elastic IP feature for this to work.
Also don't forget to set your client to use PASV mode (which is typically the default).
You can verify this works by reading the answer the server gives the client when it enters PASV mode:
Command: PASV
Response: 227 Entering Passive Mode (174,149,71,102,4,7)
This response means: "Yo FTP client, use 174.149.71.102 and port 4*256+7=1031"
The Windows EC2 instances are all Windows Server 2008. The easiest thing to do would be to enable the built-in FTP functionality.
See http://www.youtube.com/watch?v=QsGPqkobCs8.
Many people are suggesting to 'Turn off' the Firewall on Windows. It seems easy to get away from confused firewall configuration, but long run it's not good security practice.
Blog may help to configure the FTP step by step with IIS 7.x
http://clouditops.blogspot.in/2016/12/ftp-configuration-on-aws-iis-7x-server.html

Resources