Clearly, I was not using the correct protocol which should have been SFTP and not FTP.Īs you can see in the picture above, FileZilla defaults to the FTP protocol. You see, I had SFTP setup on the Linux server. I was trying to establish an FTP connection with an SFTP server. Fixing ‘Critical error: Could not connect to server’ in Linuxīy reading the error message itself made me realize my mistake. Let me tell you why you see this error and what you can do to 'fix' it. The error looks like this in the FileZilla interface. Please select proper protocol.Įrror: Critical error: Could not connect to server When I entered the hostname and password and tried to connect to the FTP server, it gave me the following error:Įrror: Cannot establish FTP connection to an SFTP server. ![]() FileZilla is a free and open source GUI software that allows you to connect to an FTP server in Linux. I use FileZilla for connecting to FTP servers. ![]() and thanks to this, everything should work smoothly :-) (.or, at least, I hope).The other day I had to connect to my web server. Also, the "control-connection" is mangled, so to replace the couple IP/PORT sent by your client with the IP/PORT of the NAT-box. Once received it relay such traffic back to your FTP client. 5) your NAT-box, thanks to the conntrack_ftp module, open an own TCP PORT (on the external interface) and gets ready to receive back FTP data-traffic on such ports.everything is like above, except for step 5.As such, it sends you the error message you see. It (correctly) dislike such a scenario, as it could lead to some reflection/DDOS scenario. 6) so the FTP server see that control connection comes from an IP while data-connection relates to a different IP.5) unfortunatly, without "special treatment", your remote FTP server, that is correctly reading/writing along the connection established at point 1), receive the couple IP/PORT specified at step 4) that contains your "private" IP address.FTP client "tell" FTP server which port has been opened, using the control-connection established at point 1) FTP client "open" a TCP port so for the FTP server to connect back to such port to transmit contents 2) FTP client want to start a file-transfer (a simple "ls").1) FTP client establish FTP connection to remote-server.Such module will carefully watch all the traffic flowing along FTP "control" connection (the one you're able to establish, to authenticate and to "launch" file trasnsfers) to check what client-ports your FTP client has declared to use for file-trasfers and properly "mangling" control-connection (to "fake" such ports, by imposing NAT box ones). In my Ubuntu (and probably also on CentOS 6): # modprobe nf_conntrack_ftp To solve your problem you should ensure that proper kernel-module is loaded on your NAT box (OpenVPN). Is NOT properly NATting the FTP protocol (that, unfortunatly, is not much NAT-friendly and, to be NATted, require special treatments). Is correctly NATting your "standard" IP connections (and, in fact, you're able to succesfully connect to the remote FTP server) If yes, than your problem relates exactly to the OpenVPN "box" that: It seems you're running your FTP client on an host that is connected to an OpenVPN server and your traffic is routed inside the VPN (so, for the external world, your source IP address is the one of the external interface of your OpenVPN server).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |