Jump to content

Ftp Access With 1and1


Harut

Recommended Posts

If you are having trouble connecting through the router, try using PASSIVE connections. Your FTP client should have an option for that (PASV).

 

Edit: By the way, as a rule of thumb, FTP is very insecure. I would suggest using SFTP with 1&1 that runs over SSH.

Link to comment
Share on other sites

thanks

 

but the problem wasn't that. it was just that widnows default program (web folder and good old ftp) didn't work, but 3-party programs, such as aceftp, worked fine.

 

btw, how do we set up sftp?

Link to comment
Share on other sites

SFTP seemed to be available by default on 1&1 after setting up a regular FTP account. You just need an SFTP client. I use SecureFX.

 

The default windows FTP client is very limited. The folder uses IE and it's also fairly limited. If you temporarily need to get them to work, you can put your PC in the what's usually called the "Demiliterized Zone (DMZ)" in the router which means ALL ports get forwarded to that PC. Otherwise, you might have to experiment with port forwarding in NAT and the router Firewall to get some ftp clients to work right.

Link to comment
Share on other sites

Port 21 is the default server port for FTP (i.e. incoming connections). It won't effect a client trying to access a remote server as the client might use any random available port to establish the outgoing connection (to port 21 on the server). After a connection is established, the server and client can be using random ports.

 

So the problem with the router usually happens when the client connects to the server, the server tries to set a connection up back to the client through some port ... but that port doesn't get forwarded from the router to your PC so the connection fails.

Link to comment
Share on other sites

why do ftp servers use random port numbers? for security reasons?

In order to set up a TCP or UDP connection between 2 PCs, one needs an IP address and port on one end and and IP address and port on the other end. Once a port is being used on a PC, then no other remote PC or local application can connect to that specific port of that PC.

 

So if you connect to an FTP server on port 21, then that server can't accept any more incoming connections until you terminate your connection.

 

To allow the server to service more than 1 connection at a time, the client and server usually negotiate and pick some random ports and start to communicate using that. This way, port 21 is kept free. Why then use Port 21? Because that's how you can get to the ftp server :)

 

Port 80 is typically HTTP. When you request a website from a server using your browser, the browser connects to the server through port 80 and they setup a TCP socket on some random avialable ports and then the server starts sending the files requested by the client. Port 80 is freed up for the next client that is going to request things from the server.

Link to comment
Share on other sites

thanks

but if i'm a client why would i need a port forwarding with my router? shouldn't it take care of the responses i get from the server i connect?

otherwise i would have to open up all my ports to connect to any server from behind a firewall.

Link to comment
Share on other sites

Your router uses something called "NAT" (network address translation). When you connect to a server, it looks at the negotiated ports and forwards things coming in from the server to the PC that made the request.

 

But if the connection initiates from the server, the router won't know where to route the packets (i.e. to your PC) so that's why sometimes you have to forward the ports to your PC manually. Well, either that, or you put your PC in the DMZ and ALL ports will get forwarded to it from the router.

 

Also, keep in mind that the port connecting from your PC to the router may be changed in the router (using NAT) to some other outgoing port from the router to the server. But what the router cannot do is it cannot use the same outgoing port connecting to the same server for 2 different PCs in your LAN ... because when a reply comes back, it won't know which PC it's for. However, if the request is going to two different servers then the router may be able to figure out which one is for which PC by keeping track of which PC made the request to which server in a table.

Link to comment
Share on other sites

But if the connection initiates from the server, the router won't know where to route the packets (i.e. to your PC) so that's why sometimes you have to forward the ports to your PC manually.

but i'm the one initiating the connection from my pc to remote server. why would the server respond to a different port (before my pc has given the ok to do so) that my router is unaware of?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...