Showing posts with label MCITP. Show all posts
Showing posts with label MCITP. Show all posts

Tuesday, 3 July 2012

Working with FTP using commands

Examples

The command list is some what exhaustive. So we will see,  practically how to work with them.

After configuring FTP on Windows Server 2008, start the client machine. 
Start Command Prompt : Start -> Run -> cmd -> OK

1. Connecting to the ftp server

ftp mcitp.com
Enter username 
Enter password
.. and you are connected. Now fire the ftp commands as per your need.


2. List the files in the remote directory

ftp> ls


3. Create a remote directory


ftp> mkdir DirectoryName

4. Change the directory


ftp> cd DirectoryName

5. Check the remote directory path


ftp> pwd


6. Copy a file from the local machine to the remote machine


ftp> put FilePath




7. Copy more than one file from the local machine to the remote machine


I want to copy the all the notepad(.txt) files from my local machine to the remote machine

ftp> mput *.txt

You will be asked at the time of transferring each file. Based on your answer (y/n) the action will be performed.


8. Copy a file from the remote machine to the local machine

Before transferring the file


ftp> get FileName




.... and the file is transferred.



9. Copy more than one file from the remote machine to the local machine


Before transferring files ..


Copy the all the files from remote local machine to my local machine
(remote machine folder is /MyFolder)

ftp> get *




.... and the files are transferred.



10. Exit the FTP environment

There are two commands to exit the FTP environment.

ftp> bye


or the other command is

ftp> quit





FTP Command List & Description

Command
Description
!
Preceding a command with the exclamation point will cause the command to execute on the local system instead of the remote system.
?
Request assistance or information about the FTP commands. This command does not require a connection to a remote system.
ascii
Set the file transfer mode to ASCII (Note: this is the default mode for most FTP programs).
binary
Set the file transfer mode to binary (Note: the binary mode transfers all eight bits per byte and must be used to transfer non-ASCII files).
bye
Exit the FTP environment (same as quit). This command does not require a connection to a remote system.
cd
Change directory on the remote system.
close
Terminate a session with another system.
delete
Delete (remove) a file in the current remote directory (same as rm in UNIX).
dir
Lists the contents of the remote directory.The asterisk (*) and the question mark (?) may be used as wild cards. For example:
get
WIP
help
Request a list of all available FTP commands. This command does not require a connection to a remote system.
lcd
Change directory on your local system (same as CD in UNIX).
ls
List the names of the files in the current remote directory.
mget
WIP
mkdir
Make a new directory within the current remote directory.
mput
Copy multiple files from the local system to the remote system. (Note: You will be prompted for a "y/n" response before copying each file).
open
Open a connection with another system.
put
Copy a file from the local system to the remote system.
pwd
Find out the pathname of the current directory on the remote system.
quit
Exit the FTP environment (same as "bye"). This command does not require a connection to a remote system.
rmdir
Remove (delete) a directory in the current remote directory.

Monday, 2 July 2012

What is File Transfer Protocol (FTP) & How to configure it ?

Introduction

FTP is an acronym for File Transfer Protocol, the protocol for exchanging files over the Internet. It is a utility program which is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. 

FTP works in the same way as HTTP for transferring Web pages from a server to a user's browser and SMTP for transferring electronic mail across the Internet in that, like these technologies, FTP uses the Internet's TCP/IP protocols to enable data transfer.

FTP is most commonly used to download a file from a server using the Internet or to upload a file to a server (e.g., uploading a Web page file to a server).

How to configure FTP on Windows Server 2008


Step 1 : Install Role Web Server (IIS)

Go to Server Manager
Select Roles
Click Add Roles (Right Side of the screen) -> Next
Select Web Server (IIS) -> Add Required Features -> Next -> Next
Scroll Down and select FTP Publishing Services -> Add Required Role Services


Next -> Install -> Close

Step 2 : Configure FTP Service

Start -> Administrative Tools -> Internet Information Services (IIS) 6.0 Manager



Expand Node Server (local computer)
Expand Node FTP Sites
Right Click on Default FTP site (Stopped)
Click on Properties


Tab : FTP Sites
Here you have to select the IP Address

Tab : Messages
Here you can specify welcome and exit messages.

Tab :  Home Directory
You can change the Local path of FTP sirte directory (I have kept the defualt)
Import - Check Write and Give OK



Step 3 : Create FTP user / Give a user FTP rights

Create User
Right Click on vikram
Click Properties
Go to Member of tab
Add -> Advanced -> Find Now
Select IIS_IUSRS
OK -> OK -> Apply -> OK


Give Access Rights to the user on ftproot directory
Go to C:\inetpub
Right Click on ftproot Directory
Click Properties
Go to Security Tab
Click Edit
Add
Advanced
Find Now
Select user Vikram 


OK -> OK
Select Full Control


OK -> OK

Step 4 : Start FTP Service

Start -> Administrative Tools -> Internet Information Services (IIS) 6.0 Manager
Expand Node Server (local computer)
Expand Node FTP Sites
Right Click on Default FTP site (Stopped)
Click Start -> OK



Step 5 : Use the FTP Service from Client Machine

Start the client Machine and Access the FTP service.

Click the following links to learn more about each mode of access.

Sunday, 1 July 2012

Active Directory Certificate Services (AD CS) & Web Enrollment

In the previous post we have seen "How to add a website in IIS7 Windows 2008". We were able to access the website from client machine using HTTP protocol. To make the communication between client and server secure, we use HTTPS i.e. http secure. The data transferred between client and server is first encrypted using the certificate and then sent. 

So let's see how to add a website in IIS7 Windows 2008 which uses HTTPS.

Prerequisite : Creating a website

Create a folder "website" in C: drive
Open a Notepad and copy paste the following code.

<html>
<body bgcolor="lightgreen">
<marquee behavior="alternate">
<h2>
Welcome to the home page of 
<font color="red">ciots.blogspot.com</font>
</h2>
</marquee>
</html>


Save the file in the website folder inside C: drive as "home.html"



Step 1 : Check the IPv4 Configuration is proper at the Server


Step 2 :  Configure DNS

Note: This step is very important for the success of the practical.


Open DNS Window and uncheck IPv6
Start - Administrative Tools- DNS
Right Click on Server
Select Properties
Select only the following IP Address
Uncheck IPv6 entry
OK

DNS - Uncheck IPv6
Create a Reverse Lookup Zone
Right Click on Reverse Lookup Zone -> Click New Zone -> Next -> 


Keep Primiary Zone Selected -> Next -> 
To all DNS servers in this domain : mcitp.com -> Next
IPv4 Reverse Lookup Zone -> Next
Enter the Network ID : 192.168.1 -> Next


Select Allow both nonsecure and secure dynamic updates -> Next -> Finish

Add an entry for www.mcitp.com
Expand Forward Lookup Zone
Select mcitp.com
Righ Click in the white space
Select New Host (A or AAAA) ...


Set the details as shown in the image and click Add Host


Step 3 : Install Role ADCS and Web Server (IIS)

Go to Server Manager
Click on Roles Node
Click Add Roles (Right side middle of the screen) -> Next
Select Active Directory Certificate Services
Select Web Server (IIS) -> Add Required Features -> Next -> Next


Select Certification Authority Web Enollment -> Add Required Role Services -> Next


Give Next -> Next (10 times) -> Install -> Close

Step 4 : Configuring IIS and Web Enrollment

Add Website
Start -> Administrative Tools -> Internet Information Service (IIS) Manager
Expand SERVER(MCITP\Administrator) Node
Right Click on Sites -> Add Web Site



Enter the details as follows.
Site name: test
Browse and set the website directory as Physical path
Select https as type
Select the IP Address : 192.168.1.10
Select SSL certificate : server.mcitp.com
(If you cannot see the above option, then do a log off and log in again)
Ok


Enable Directory Browsing
Expand Sites Node
Select test
Double Click on Directory Browsing




Click Enable (on the extreme right of the screen)

Delete Default Documents and make entry for home.html
Click on test node
Double Click on Default Documents


Delete all the documents
Right Click -> Add
Write : home.html
OK


SSL Settings
Click on test
Double Click on SSL settings


Check Require SSL
Select Require
Click Apply



Stop test web site
Select Test and click on stop

Step 5 : Install Certificate on client machine

Start the client machine (this machine is already in network with the server but not in domain)
Go to internet explorer and type URL http://mcitp.com/certsrv
Provide server Administrator credentials -> Ok


Click on Request a certificate


Click User Certificate
Click Submit Button -> Yes
Click Install this certificate
Yes-> Yes

Step 6 : Start test web site

Now come back to the IIS Manager on Server
Select Default Web Site and Stop it
Select test web site and Start it

Step 7 : Access the HTTPS website from client

Again go to the client browser and type https://mcitp.com
Yes -> Yes -> Ok ->
And the website is infront of you.

How to add a website in IIS7 Windows 2008

Prerequisite : Creating a website

Create a folder "website" in C: drive
Open a Notepad and copy paste the following code.

<html>
<body bgcolor="lightgreen">
<marquee behavior="alternate">
<h2>
Welcome to the home page of 
<font color="red">ciots.blogspot.com</font>
</h2>
</marquee>
</html>


Save the file in the website folder inside C: drive as "home.html"


Step 1 : Install Role Web Server (IIS)

Go to Server Manager
Click on Roles Node
Click Add Roles (Right side of the screen) -> Next
Select Web Server (IIS) -> Add Required Features


Next -> Next -> Next -> Install

Step 2 : Adding Website in Internet Information Service (IIS) Manager

Start -> Administrative Tools -> Internet Information Service (IIS) Manager
Expand SERVER(MCITP\Administrator) Node
Right Click on Sites -> Add Web Site


Enter the following details.
Site Name: test.
Application pool: IIS7 will automatically create a unique application pool based on your site name.
Physical Path:  The directory on the server that your web site content is stored in. (C:\Website)
Binding: This is necessary for running multiple websites from the same IP address.
Type: Leave at http
IP Address: Choose the IP address the domain name resolves to that you configured in DNS.
Port: Leave at 80
Host Name: Type in your domain name without the www. (mcitp.com)

OK.

Enable Directory Browsing
Expand Sites Node
Select test
Double Click on Directory Browsing


Click Enable (on the extreme right of the screen)

Delete Default Documents & make entry for home.html

Click on test
Double Click on Default Documents



Delete all the documents
Right Click -> Add
Write : home.html
OK



Start the test web site
Select Default Web Site and Stop it
Select test web site and Start it

Step 3 : Access the web page from client machine

Note: The client machine is already connected with the server and it is not in domain.

Start Internet Explorer (or any other browser)
Type URL : http://mcitp.com
and press Enter.
The web page is in front of you.

Do you like this article?