Is FTP port 22 or 21?

What is port 20 and 21 used for?

I was wondering if anyone can help me out.

I'm on a project to use the serial port. I'm using a micro controller to communicate with a computer and I want to know what port numbers I need to use. The computer is a windows PC and the micro controller is running windows CE 4.0. I have tried the USB serial port and the COM1 but they didn't work. I tried to use the COM1 and it said port 20 and 21 were already in use. I'm not sure what this means.

Port 21 is used for some hardware serial communication (probably RS232) that's built into the microcontroller's internal UART. Port 20 is probably some generic input/output port (and it's not used by the UART, so it doesn't matter which port you use).

There are lots of good online tutorials for getting up and running with serial ports.

Is port 22 an FTP?

You get in, you get out, that's all.

I mean, a lot of people don't realize this, but the majority of FTP connections are only used for file transfers, and not to download anything. What do you think happens when you're on a typical network? You send an SSH connection to a remote server, and you can log into that server, right? Well, if that server doesn't have an FTP service running on it, what does that mean? Not much. All it means is that there's no FTP service running on that server, which means that if someone doesn't have an FTP client like Filezilla installed, they can't access your files via FTP.

And that's where things can get weird. If you've ever been to your boss's office and they tell you to go into their FTP server and copy the file that you need to move from the old to the new FTP server, but the thing is, that's a real FTP server. And when they tell you to copy that file, what you're actually copying is the Filezilla FTP directory, which isn't exactly the same thing.

For example, if you go to your company's FTP server, and the server's name is ftp.com, and it's password is 12345, and there's a directory called publichtml, it's going to look like this: ftp.com/publichtml/ Now, in this case, the username would be anonymous, and the password is 12345, but it's not going to be very difficult to find that information out. So if you were in a company like that, you could go to the FTP server, you could log into it, and then you could use a program like Filezilla to just pull all the files from their FTP server and move them over to the new server. Now, it's a much easier process, but it's not the real FTP server.

Is FTP a TCP or UDP port?

Is there a need for port forwarding to use an FTP server?

I want to be sure I understand all the protocols involved.

FTP is a TCP port, not a UDP. It's only "port" is a TCP number. It's just "port" used. Like HTTP or IMAP-port is just an index in that particular protocol used.

For a FTP-server you have to open the "TCP port 21". You do that using a "portforward" server which you can reach from your router. If it listens for TCP-connections, it's fine to make them with the IP-address of the FTP-server. This is true if you want to use portforward with a "TCP/IP" address (like localhost).

Your Router does the portforwarding for you. You don't need to do anything more. This is usually done automatically. You only have to make sure the portforwarder listens on the port number you chose for the portforwarding.

I have no idea what you mean with "a need for port forwarding". A portforwarder will not make FTP work.

It doesn't say anywhere that FTP requires port forwarding. It says only a UDP connection to port 21.

FTP is an acronym for File Transfer Protocol and has nothing to do with UDP. It is just a TCP-based standard way of exchanging files between two computers over the internet.

All ports above 1024 are reserved and cannot be used by external IP addresses unless a special exception applies, like FTP. The FTP standard says that a TCP port "21" is needed to allow for connection to a server. But this does not mean that you have to have a connection open at this port number. So you are right in saying that the FTP server should accept connections on any TCP port number, if needed.

This "default" value can be changed by FTP server vendors, since many of them support different sets of ports. The default port for FileZilla is "21". This is where most servers set it by default. But if you wish to change it, you can set it to a different port.

You can configure the port forwarding setting for your router to accept all incoming connections from a different IP-address from the one your FTP-server is listening on. This is different than port forwarding.

Is FTP port 22 or 21?

I was wondering which of these is most secure/used by more hosts: ftp://localhost.

or

Ftp://10.2.3

Where 10.3 can be any IP address.

I have read a little bit about the difference between using either one of them but I didn't find anything clear to me. Thanks! On the server side, FTP connections can only be made to port 21 (or possibly some variants thereof), while the usual HTTP connection (on port 80) would be on port 80, just as you suggest. If you're speaking about the client side, the port number is irrelevant. If your question was "what is the security advantage of using a private port", then your answer is that the port number doesn't matter. It's just a convenient way of identifying a connection and not letting others take over your connection.

For example, it's possible to make a connection to a web server, and for a packet sniffer to just see that a connection was made and ignore it. But if a hacker wanted to hijack the connection, they could only do so to a server running on port 80, and your web browser would know to alert you to that. The reason for this is so you don't get into a situation where the hacker can send something to you over your connection to another server.

The exact advantages of using FTP versus other protocols are pretty much beyond the scope of what you're asking, but the main advantage is that once the connection is established, your data is encrypted, even if your client and server are not, and the only thing visible in the packets between them is the port number. See also What are the security implications of using FTP vs WebDav? for more on the subject.

Related Answers

How do I create an FTP protocol?

The two most famous examples are the ones by Guillermo Amaro Alonso () and...

What is an example of file transfer?

I have a file on my computer. I would like to transfer...

What is the benefit of FTP?

For me, and maybe you, FTP is a pain in the ass. A pain in...