I've been reading up on FTP ports and I get it, but also i don't...Here's how I understand it...
Active
Client:randomport > Server:21
Server:20 > Client:randomport
* this means that a firewall has to be ready to allow all dynamic ports to be open because it never knows which one from 1024>65535 it might be.
So you configure it to do passive...
Client:randomport > Server:21
Server responds by saying "client, i'm going to use a port but it is in this range 6000-6010, i'm going to use 6001 for data"
Client:randomport2 > Server:6001
* this means you only need open 11 ports instead of 60,000
Ok I get this, BUT....
When I use an FTP site that is behind a firewall how the heck does it work, when I'm also behind a firewall that only allows outbound on specific port?
So i'm allow port 21 out, the server connects and says I'll connect to your port from port 20. My firewall will block. Or if it has a PASV dynamic port range a similar situation is there, I connect on port 21, the server says come back but connect on 6001. This means I must allow 6001 outbound (which also isn't the case)
So try and connect to a well known FTP site and use netstat -an to see what ports have established connection, it will be 21 only at a rough guess so whats all this "ftp-data port" and PASV range setting and why won't it work without it on mine???
Anyone care to explain? I thought FTP just used port 21 but apparently not... but why does it work?
Active
Client:randomport > Server:21
Server:20 > Client:randomport
* this means that a firewall has to be ready to allow all dynamic ports to be open because it never knows which one from 1024>65535 it might be.
So you configure it to do passive...
Client:randomport > Server:21
Server responds by saying "client, i'm going to use a port but it is in this range 6000-6010, i'm going to use 6001 for data"
Client:randomport2 > Server:6001
* this means you only need open 11 ports instead of 60,000
Ok I get this, BUT....
When I use an FTP site that is behind a firewall how the heck does it work, when I'm also behind a firewall that only allows outbound on specific port?
So i'm allow port 21 out, the server connects and says I'll connect to your port from port 20. My firewall will block. Or if it has a PASV dynamic port range a similar situation is there, I connect on port 21, the server says come back but connect on 6001. This means I must allow 6001 outbound (which also isn't the case)
So try and connect to a well known FTP site and use netstat -an to see what ports have established connection, it will be 21 only at a rough guess so whats all this "ftp-data port" and PASV range setting and why won't it work without it on mine???
Anyone care to explain? I thought FTP just used port 21 but apparently not... but why does it work?