Sunday, September 7, 2008

What is FTP?File Transfer Protocol (FTP) is a network protocol used to transfer data from one computer to another through a network, such as the Internet. FTP is a file transfer protocol for exchanging and manipulating files over any TCP-based computer network. A FTP client may connect to a FTP server to manipulate files on that server. As there are many FTP client and server programs available for different operating systems, FTP is a popular choice for exchanging files independent of the operating systems involved.

What is Active and Passive FTP? The BasicsFTP is a TCP based service exclusively. There is no UDP component to FTP. FTP is an unusual service in that it utilizes two ports, a 'data' port and a 'command' port (also known as the control port). Traditionally these are port 21 for the command port and port 20 for the data port. The confusion begins however, when we find that depending on the mode, the data port is not always on port 20.

Active FTPIn active mode FTP the client connects from a random unprivileged port (N > 1023) to the FTP server's command port, port 21. Then, the client starts listening to port N+1 and sends the FTP command PORT N+1 to the FTP server. The server will then connect back to the client's specified data port from its local data port, which is port 20.From the server-side firewall's standpoint, to support active mode FTP the following communication channels need to be opened:

In step 1, the client's command port contacts the server's command port and sends the command PORT 1027. The server then sends an ACK back to the client's command port in step 2. In step 3 the server initiates a connection on its local data port to the data port the client specified earlier. Finally, the client sends an ACK back as shown in step 4.The main problem with active mode FTP actually falls on the client side. The FTP client doesn't make the actual connection to the data port of the server--it simply tells the server what port it is listening on and the server connects back to the specified port on the client. From the client side firewall this appears to be an outside system initiating a connection to an internal client--something that is usually blocked.

Passive FTPIn order to resolve the issue of the server initiating the connection to the client a different method for FTP connections was developed. This was known as passive mode, or PASV, after the command used by the client to tell the server it is in passive mode.In passive mode FTP the client initiates both connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client from the server. When opening an FTP connection, the client opens two random unprivileged ports locally (N > 1023 and N+1). The first port contacts the server on port 21, but instead of then issuing a PORT command and allowing the server to connect back to its data port, the client will issue the PASV command. The result of this is that the server then opens a random unprivileged port (P > 1023) and sends the PORT P command back to the client. The client then initiates the connection from port N+1 to port P on the server to transfer data.From the server-side firewall's standpoint, to support passive mode FTP the following communication channels need to be opened:

In step 1, the client contacts the server on the command port and issues the PASV command. The server then replies in step 2 with PORT 2024, telling the client which port it is listening to for the data connection. In step 3 the client then initiates the data connection from its data port to the specified server data port. Finally, the server sends back an ACK in step 4 to the client's data port.While passive mode FTP solves many of the problems from the client side, it opens up a whole range of problems on the server side. The biggest issue is the need to allow any remote connection to high numbered ports on the server. Fortunately, many FTP daemons, including the popular WU-FTPD allow the administrator to specify a range of ports which the FTP server will use. The second issue involves supporting and troubleshooting clients which do (or do not) support passive mode. As an example, the command line FTP utility provided with Solaris does not support passive mode, necessitating a third-party FTP client, such as ncftp.

Thursday, September 4, 2008

Google enters into a new era of competition in IE Browsers. Google has launched its new “Google Chrome” browser and claims to be one of the fastest internet browser. This browser has many advance functions including the unique one – incognito window. The data (such as cookies etc)entered into the incognito window will not be saved in the browser history. Chrome has a capability to show "Most Visited" pages, Recent Bookmarks and even search box is provided on the IE. Unlike other browsers, Chrome gives a larger client area (client area is the area where the web page is displayed).

Wednesday, September 3, 2008

MAGIC #1Nobody can create a FOLDER anywhere on the computer which can be named as “CON“. Try it!!!

MAGIC #2This one is awesome. Try it yourself… Open Microsoft Word and type=rand (200, 99)and then press ENTER

MAGIC #3Do the following:1. Open an emty notepad file2. Type “bush hid the facts” ( without the quotes )3. Save it as whatever you want.4. Close it, and re-open it.See what has happened….You can try the same thing above with another sentence “this app can break”.

About Me

Sandeep Aparajit

Sandeep is a software engineer, working for Microsoft. He loves to hunt challenging problems. He has bagged MCP, MCTS in .NET, C# and ASP.NET. He is also certified in Analyzing Requirements and Defining Microsoft .NET Solution Architectures. Actively involved in forums.microsoft.com, CodeProject.com, C# Corner, ASP.NET, Community-credit.com etc.He has provided several training sessions to freshers and experienced people on C# and .NET.
Apart from his technical portfolio, he loves Photography. He is a spiritual person and believes in god.

Buy Original Microsoft Software

Disclaimer:

All reasonable measures have been taken to ensure the quality, reliability, and accuracy of the information on this website. However, I:

*may delete, add to, or amend information on this website without notice

*am not responsible for the content of other websites linked to, or referenced from, this website and,makes no warranties or representations, expressed or implied, as to the accuracy of information contained at this site.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.