In this video, Mike tackles one of the earliest and most common protocol for moving files, File Transfer Protocol (FTP). He explores how FTP works, including passive mode and active mode and port triggering.
- Downloading a file on the internet today is usually pretty easy. We open up a web browser, we see some kind of link and it says download, we click on it and it goes into our download folder off of our web browser. Now, before the web was popular, there was an another way to move files around on the internet called file transfer protocol or FTP. Now FTP in its most simple mode uses port 21 and it's a pretty straight forward process. Now, if you're going to be doing FTP, well first of all you need an FTP client. Luckily for us, every web browser on earth is an FTP client. Here's an example right here. What I want you to look at very careful is look where I'm linked into. This is not HTTP, do you see this? This says FTP, colon, whack, whack. What you're looking at here is an FTP site. So pretty much every web browser is an absolutely fantastic FTP client in and of itself. But if you want to do really robust FPT, you're going to have to get an FTP client. I've got one here called FileZilla. Now not only do I have a robust FTP client but I also have a much more robust FTP server. The FTP site that we just saw is basically just a download only site. But I want to be able to upload things and I want to make folders and do all kind of cool stuff like that and kind of use it as a central repository. FTP was cloud storage before cloud storage was cool. Anyway, so what I'm going to do is I'm going to fire up FileZilla and I've actually set up a much more robust FTP server. So let's fire up FileZilla and log into my FTP server. So I actually have to type in either the IP address or the fully qualified domain. I'm going to make a shorter one next time. I'm going to type in port 21 cause that's the port I'm using. And I'm going to to a Quickconnect. Now, what you're seeing here is this is my computer over here. In fact you can even see I'm on my desktop right here and you can see Timmy.docx right there. And this is my remote connection. So I can double click on files here and there's plans_for_world_domination. So if I want to copy something... And I've just uploaded that file to the FTP site. So more robust FTP clients and robust FTP servers will let you do stuff like make folders on the FTP site and all kinds of cool stuff like that. Which is great, however there's a bit of a catch. And that is there is a situation where FTP can use a different mode called Active Mode. So what I'm going to do right in here is, you'll notice I have an option. Right now it's set to Passive Mode but I could set it to Active Mode. I'm going to cancel that for a moment. Passive Mode means everything's done on port 21. However, if you kick it into Active Mode, which is the traditional way FTP works, something actually strange and wonderful happens. Let me show you. Here's my FTP client and here's my FTP server. Now normally when I send an FTP request, it's going to go out on port 21 and of course he'll put some other ephemeral port number as the source. So when this goes out here, the server as most applications do, just spins these around when it sends it back. And then as it comes back in here, the destination's going to be 14161 and then the source is going to be port 21. That's great but when you're in Active Mode the game changes. So what will happen is that you will have this type of connection but another connection takes place automatically. You'll send this on port 21 but he'll start sending back communications on port 20 and that's a problem because any router worth it's salt is going to block this. You initiated on port 21 and that's cool but you didn't initiate on port 20 and FTP servers in Active Mode will start sending stuff on port 20, which is going to freak your client and your router out. Active Mode is about five times faster than Passive Mode but the problem you run into is that any good router is going to block this because nobody initiated a port 20 communication from inside your network. So in order to deal with this, every router on earth has something called Part Triggering and it's pretty much just for FTP. Let me show you Port Triggering. So let me get on here and this is definitely going to be an advanced thing. So what we need to find here and it's always fun to try to find this stuff. Here it is, Port Triggering. So what we want to tell the computer is that... Let's see if it has FTP in here already. Nope, no problem. We're going to do it from scratch. So we're going to call this Active FTP. And the Triggering Port is somebody's going to send something out on port 21 and we can just say ALL, it's probably TCP but we'll just say ALL to play it safe. So basically we're saying, look, if somebody sends something out on port 21, you need to allow incoming port 20s. So we hit okay. And we have now set up a Port Trigger. So I'm using FTP as an example for Port Triggering but a lot of games require Port Triggering, a lot of specialty applications require Port Triggering. So while Active FTP is a great example, if you set off something on port 21, it's going to shoot back on port 20, be aware that other applications may need this. The nice part is is that if an application requires Port Triggering, usually during the install process they're going to go, oh, you might want to go into your router and set up Port Triggering in XYZ way so that it will work. (jazzy guitar music)
This Total Seminars course covers the exam certification topics. For information on additional study resources—including practice tests, lab simulations, books, and discounted exam vouchers—visit totalsem.com/linkedin. LinkedIn Learning members receive special pricing.
This course was created by Total Seminars. We are pleased to offer this training in our library.
We are a CompTIA Partner. As such, we are able to offer CompTIA exam vouchers at a 10% discount. For more information on how to obtain this discount, please download these PDF instructions.
- Internet tiers
- How dial-up and broadband connections work
- File Transfer Protocol (FTP)
- Classic email protocols
- Setting up a generic VPN
- Typical IoT setups and configurations
- Setting up a new virtual machine (VM)
- Networking with VMs
- Cloud ownership