VPN Vimal
VPN Vimal
ON
“VIRTUAL PRIVATE NETWORK BY JAVA”
SUBMITTED IN THE PARTIAL FULFILLMENT OF THE REQUIREMENTS
OF
Session (2018-2021)
SUBMITTED TO SUBMITTED BY
1
A MAJOR PROJECT REPORT
ON
“VIRTUAL PRIVATE NETWORK BY JAVA”
REQUIREMENTS
OF
Session (2018-2021)
SUBMITTED TO SUBMITTED BY
1
ACKNOWLEDGEMENT
The satisfaction that accompanies successful completion of any work would be incomplete
Primarily, I would like to thank my faculty members for giving me the opportunity to fulfill
my aspiration. With deep sense and regards, I am obliged to Mr. PUNIT KUMAR
SHARMA , Project Guide and project coordinator, as he had a direct influence, some way, in
my motivation and gratefulness for being part of the responsible project guide of the institute.
I am very thankful to him for his valuable guidance and remarkable patience in guiding my
I wish to thank my parents for their constant encouragement which is like snow, so after
when it falls and longer when it falls and longer when it dwells upon, the deeper it sinks in
mind.
I will be failing in my mission if I do not thank other people who directly or indirectly helped
So, my heart full thanks to all friends maiSnly who supported and encouraged me in
VIMAL
BCA VITH SEM
ROLL NO. 180942106180
2
CERTIFICATE
This is to be certify that this Project Report entitled “VIRTUAL PRIVATE NETWORK”
which is submitted by VIMAL KUMAR (180942106180), in the partial fulfillment, for the
The matter embodied in this Project Work has not been submitted earlier for award of any
degree or diploma in any university/institution to the best of our knowledge and belief.
(Mr. Punit Kumar Sharma) (Mr. Rajiv Kumar) (Mrs. Shweta Batra)
Project Guide Head of the Department Director
Date: __/__/____
3
INDEX
S.NO CHAPTER PAGE
1. INTRODUCTION………………………… 5-8
3. REQUIREMENT ANALYSIS……………… 14
7. CODING…………………………………... 49-85
9. CONCLUSION…………………………… 92-93
10. REFRENCES……………………………... 94
4
Introduction
5
Virtual Private Network (VPN)
The “Virtual Private Network (VPN)” has emerged as one of the leading technologies
at present and has attracted the attention of many organizations looking to both expand their
This paper deals with the upcoming technology, VPN - Virtual Private Network
which has proved itself to be lot reliable in transferring data between remote places via a
The VPN has the ability of providing connection between the user (client) & the
server of the organization not within the workplace itself but from home too with the data
being transferred & received in a highly secured way. For example Telecommuters and those
who travel often might find VPNs to be a more convenient way to stay "plugged in" to the
corporate Intranet.
This paper deals with the ideas of implementing a VPN connection featuring the
general working of the whole process, protocols involved, basic concepts of VPN,
establishing the tunneling mechanism, the methods of data encryption and decryption along
This project throws light on the concept behind in establishing the VPN connection
Data Authentication
Data Integrity
Data Confidentiality
Each stage explains of the ways in which these get invoked. Hitherto the Architecture
of the same along with its types has been discussed. The role of the various Protocols namely
6
PPTP, L2TP and IPSEC are clearly explained citing a “Transport Mode” configuration of
IPSEC on a Windows 2000 server. We have also discussed the configuration of Routers
LAN-to-LAN internetworking
Digital certificates are used in a network security system to guarantee that the two
parties exchanging information are really who they claim to be. A certificate authority keeps
a complete list of all certificates it has ever issued and information on their status: valid,
expired, or revoked.
Evolution of vpn :
Previously people found it very difficulty to transfer information from one place to
another namely in the case of a WAN where there was every single possibility of the data
being hacked midway between the two terminals. Further this security measure involved a
great deal of money if we were to use a long distance leased line , both these factors standing
Alternatively the VPN came into existence making use of the concept of using a
public network say for example the ISDN invoking some new technology and by providing
greater security. The factors by which VPN provides low cost are
By eliminating the need for expensive long-distance leased lines. With VPNs
7
service provider. This could be a local broadband connection such as DSL
service.
Another way VPN reduce costs is by lessening the need for long-distance
telephone charges for remote access. Recall that to provide remote access
service, VPN clients need only call into the nearest service provider’s access
point. In some case this may require a long distance call, but in many cases a
A more subtle way that VPNs may lower costs is through offloading of the support
burden. With VPNs, the service provider rather than the organization must support dial-up
access for example. Service providers can in theory charge much less for their support than it
costs a company internally because the public provider’s cost is shared amongst potentially
thousands of customers.
8
1.2 Project formulation
The “Virtual Private Network (VPN)” has emerged as one of the leading technologies
at present and has attracted the attention of many organizations looking to both expand their
The VPN has the ability of providing connection between the user (client) & the
server of the organization not within the workplace itself but even from home too with the
data being transferred & received in a highly secured way. For example Telecommuters and
those who travel often might find VPNs to be a more convenient way to stay "plugged in" to
This paper deals with the ideas of implementing a VPN connection featuring the
general working of the whole process, protocols involved, basic concepts of VPN,
establishing the tunneling mechanism, the methods of data encryption and decryption along
with the discussion on enhancement models citing block diagrams and flow charts at apt
places.
The construction & successful execution of VPN involves certain key points that have
got to be remembered throughout the process. These stand as pillars to make the VPN the
“Technology most wanted” at present. They include Data Integrity: 1. the condition existing
when data is unchanged from its source and has not been accidentally or maliciously
modified, altered, or destroyed. 2. The condition in which data are identically maintained
during any operation, such as transfer, storage, and retrieval. 3. The preservation of data for
their intended use. 4. Relative to specified operations, the a priori expectation of data quality.
9
Data Authentication: A process used to verify data integrity, e.g., verification that
data received are identical to data sent, or verification that a program is not infected by a
virus.
services.
message to any party other than the intended recipient(s). It is provided on a per-message
If the originator chooses an asymmetric algorithm, the recipient's public key is used to
encrypt the message content. The recipient uses its private key to decrypt the content. If an
asymmetric encryption algorithm is used, the message can only be addressed to a single
recipient (i.e., the recipient whose private key is paired with the public key used to perform
the encryption).
possible. The originator encrypts the content using a symmetric encryption key. This key may
be distributed to each message recipient by placing the key in the encrypted-data of the
message token for that recipient. The key may also be distributed by some other means (e.g.,
by prior agreement).
The message originator can encrypt the content using any symmetric or asymmetric
algorithm understood by both the originator and the recipient. All information relevant to the
10
algorithm, such as the algorithm's object identifier and any input parameters, can be conveyed
Message flow confidentiality allows the message originator to conceal the flow of a
message through the MHS, protecting against information that may be derived from its
observation. This service counters the threats of traffic analysis and loss of anonymity of the
safeguard and control equipment, keying material, and information and is answerable
Administration module
Marketing module
Training module
Office details
Staff details
Office details
Enquiry
11
Student Registration
Salary details
Staff Details
Staff attendance
Adding Clients
Client list
Placement details
Course details
Project training
J2EE Training
Software Testing
Networking
12
PROJECT
DEVELOPMENT
13
2.1. Requirement analysis
14
Floppy Drive : 1.44 MB fdd
CDROM : 52 X
The main objective of the feasibility study is to test the technical and
evaluated from a technical, social and economic feasibility of developing a computer system.
The proposed system must be evaluated from a technical viewpoint. Then they must be tested
responsible for the client privileges. Also the clients receives their status in the organization.
Any client in the network can access the server but only the users in the server maintenance.
certified he can access the modules other than that is forbidden to him.Cost minimization and
effictive dataflow rate than exsisting system make this system more efficient.
15
2.2.2 Existing system
The management reports of the company that are highly confidential have to
This type of connection is highly secure. The data transferred can be of large
quantity. It is also reliable as the connection established is for that particular organization and
hence most suitable but considering the cost involved is so high that the need for alter nature
is a must.
Dialup connection
by the organization. Hence even though it is cost effective . There is no assurance that a
connection is established when required and the amount of data that can transferred is less
Frame Relay
In this case the bandwidth is divided among the mutually agreed organizations
by using statistical division multiplexing. The cost involved is less. But the bandwidth
Electronic Mail
In this case the company has to relay on the internet for the data transfer. The
information on the internet can be easily hacked by hackers and hence the information should
16
2.2.3 Proposed System
The need of using a VPN is to provide the service of internet in a highly secure way.
This process a router, ATM switch and internet to connect too or more LAN or WAN
In order to establish this we have built our own software. This software is
divided into two the Server side or the Head Office program and the Client side or the Branch
Office program. The Client comprises of the “Data Collecting Forms” and the Server side
comprises of the “Report Box” wherein the data sent get appended for each transaction.
2.2.4 Proposal:
We plan to implement an server that can receive requests for a bit stream transfer.
This bit stream will be encrypted using Encryption algorithm. When received by a client, the
bit stream will be decrypted using a public key and a private key pair. This decrypted
message will then be displayed on the screen. If successful, the message will be a random
fortune provided by the Server administrator who is running the server. This project serves
two purposes: First, it allows the programmers to explore more deeply the topic of data
encryption and securities. Second, it allows the programmers to see how clients and servers
interact in the network environment and how to specify the proper protocols.
Scalability – This is one of the most important features that is in need. It refers to the
inclusion of new clients within the network. If this provision is not provided the whole of the
network may prove to be of little use in future when the organization is expanding.
17
Remote Back up Server – This extends its way out to creating a back up for every
single file created within the WAN automatically. An advanced version of this might be
creating a back up for every request from the client to the server( vice-versa) and the response
of the same to it. This proves to be of much help in cases of system crash down.
Remote Monitoring – This feature as the name suggests would monitor or keep track of
all the activities done by every single individual or client within the network. This helps in
avoiding the misuse of the systems providing additional security within the network.
Providing Certification - In order for the two (or more) LANs to interact with each
other we need to provide Certification. This certification may be either user level or the
server level or both so as to provide security. This has got to be done using Software
Providing Acknowledgement - In cases we maybe unsure if the data sent has reached
the correct destination and that too without any error in the transmission path. This maybe
over come by providing acknowledgement signals back to the front end once the data have
reached the destination . Our task here is to generate a code which shall verify if the data
have been received without any corruption and then generate an acknowledgement signal to
18
2.3 Software Description
History Of Java:
Java language was developed by James Gosling and his team at sun micro systems
and released formally in 1995. Its former name is oak. Java Development Kit 1.0 was
Overview Of Java:
java is midway between an interpreted and a compiled language. Java programs are compiled
by the java compiler into Byte Codes which are secure and portable across different
platforms. These byte codes are essentially instructions encapsulated in single type, to what is
Jvm verifies these byte codes when downloaded by the browser for integrity. Jvm
available for almost all OS. JVM converts these byte codes into machine specific instructions
at runtime.
Features Of Java:
inheritance. Every thing in java is an object except some primitive data types.
19
• Java is portable architecture neutral that is java programs once compiled can
• Java supports multithreading. There for different parts of the program can be
language. Internet users can use java to create applet programs and run them locally using
java enabled browser search as hot java. Applets can be downloaded from remote machine
World Wide Web is an open ended information retrieval system designed to be used
in the distributed environment. This system contains web pages that provide both information
and controls. We can navigate to a new web page in any direction. This is made possible
worth HTML java was meant to be used in distributed environment such as internet. So java
could be easily incorporated into the web system and is capable of supporting animation
graphics, games and other special effect. The web has become more dynamic and interactive
with support of java. We can run a java program on remote machine over internet with the
support of web.
20
Java Environment:
Java environment includes a large no. of tools which are part of the system known as
java development kit (JDK) and hundreds of classes, methods, and interfaces grouped into
Java Architecture:
development. Java provides portability by compiling the byte codes for the java virtual
machine which are then interpreted on each platform by the runtime environment. Java also
provides stringent compile and runtime checking and automatic memory management in
When we compile the code, java compiler creates machine code (byte code) for a
hypothetical machine called java virtual machine (jvm). The jvm will execute the byte code
and overcomes the issue of portability. The code is written and compile for one machine and
interpreted all other machines. This machine is called java virtual machine.
About HTML:
HTML (hyper text markup language) is a language used to create hyper text
documents that have hyper links embedded in them. It consists of tags embedded in the text
of a document with HTML. We can build web pages or web document s. it is basically a
formatting language and not a programming language. The browser reading the document
interprets mark up tags to help format the document for subsequent display to a reader.
WWW (World Wide Web) pages are written using HTML. HTML tags control in part the
representation of the WWW page when view with web browser. The browser interprets
21
HTML tags in the web document and displays it. Different browsers show data differently.
• Netscape
• Internet Explorer
The JDBC 1.0 API provided result sets that had the ability to scroll in a forward
directionally. Scrollable result sets allow for more flexibility in the processing of results by
providing both forward and backward movement through their contents. In addition,
scrollable result sets allow for relative and absolute positioning. For example, it’s possible to
move to the fourth row in a scrollable result set directly, or to move directly to the third row
following the current row, provided the row exists. The JDBC API allows result sets to be
Increased support for storing persistent Java programming language objects (Java
objects) and a mapping for SQL99 data types such as binary large objects, and structured
types, has been added to the JDBC API. An application may also customize the map-ping of
Row sets:
As its name implies, a row set encapsulates a set of rows. A row set may or may not
maintain an open database connection. When a row set is ‘disconnected’ from its data source,
updates performed on the row set are propagated to the underlying database using an
optimistic concurrency control algorithm. Row sets add support to the JDBC API for the
22
JavaBeans component model. A row set object is a bean. A row set implementation may be
serializable. Row sets can be created at design time and used in conjunction with other
The example below illustrates creation of a result set that is forward-only and uses
read-only concurrency. No performance hints are given by the example, so the driver is free
to do whatever it thinks will result in the best performance. The transaction isolation level for
the connection is not specified, so the default transaction isolation level of the underlying
database is used for the result set that is created. Note that this code is just written using the
JDBC 1.0 API, and that it produces the same type of result set that would have been produced
Connectioncon=DriverManager.getConnection("jdbc:my_subprotocol:my_sub name");
applications for the enterprise and leverage the speed, security, and reliability of server-side
technology. If you are already working in this area, you know that in today's fast-moving and
be designed, built, and produced for less money, faster, and with fewer resources than ever
before.
applications. The J2EE platform gives you a multitiered distributed application model, the
23
ability to reuse components, a unified security model, and flexible transaction control. Not
only can you deliver innovative customer solutions to market faster than ever, but your
platform-independent J2EE component-based solutions are not tied to the products and
functionalities available in J2EE SDK version 1.4. Whether you are a new or an
experienced enterprise developer, you should find the examples and accompanying text a
valuable and accessible knowledge base for creating your own enterprise solutions.
If you are new to J2EE applications development, this chapter is a good place to
start. Here you will learn the J2EE architecture, become acquainted with important terms
and concepts, and find out how to approach J2EE applications programming, assembly, and
deployment.
The J2EE platform uses a multitiered distributed application model. This means
that application logic is divided into components according to function, and the various
application components that make up a J2EE application are installed on different machines
depending on which tier in the multitiered J2EE environment the application component
belongs. Figure 1 shows two multitiered J2EE applications divided into the tiers described
in the bullet list below. The J2EE application parts shown in Figure 1 are presented in J2EE
Application Components.
24
• Business tier components run on the J2EE server
• Enterprise information system (EIS) tier software runs on the EIS server
While a J2EE application can consist of the three or four tiers shown in blow
applications because they are distributed over three different locations: client machines,
J2EE server machine, and the database or legacy machines at the back-end. Three-tiered
applications that run in this way extend the standard two-tiered client and server model by
placing a multithreaded application server between the client application and back-end
storage.
Multitiered Applications
25
J2EE Application Components:
contained functional software unit that is assembled into a J2EE application with its related
classes and files and communicates with each other components. The J2EE specification
• Java Servlet and JavaServer PagesTM (JSPTM) technology components are web
components.
components.
J2EE components are written in the Java programming language and compiled in the
same way as any Java programming language program. The difference when you work with
the J2EE platform, is J2EE components are assembled into a J2EE application, verified that
they are well-formed and in compliance with the J2EE specification, and deployed to
production where they are run and managed by the J2EE server.
The VPN has the ability of providing connection between the user(client) & the server
of the organization not within the workplace itself but even from home too with the data
The diagram below illustrates a VPN remote access solution. A remote node (client)
wanting to log into the company VPN calls into the local server connected to the public
network. The VPN client establishes the connection to the VPN server maintained at the
26
company site. Once the connection has been established, the remote client can communicate
with the company network just as securely over the public network as if it resided on the
A simple extension of the VPN remote access architecture shown above allows an
entire remote network (rather than a single remote client) to join the local network. Rather
27
than a client-server connection a server-server VPN connection joins two networks to form
The implementation of VPN involves the use of three major protocols which aid in
associate PPTP with Microsoft because nearly all flavors of Windows include built-in support
for the protocol. The initial releases of PPTP for Windows by Microsoft contained security
features that some experts claimed were too weak for serious use. Microsoft continues to
PPTP's primary strength is its ability to support non-IP protocols. The primary
drawback of PPTP is its failure to choose a single standard for encryption and authentication.
Two products that both fully comply with the PPTP specification may be totally incompatible
The original competitor to PPTP in VPN solutions was L2F -- a protocol implemented
primarily in Cisco products. In an attempt to improve on L2F, the best features of it and
PPTP were combined to create new standard called L2TP. L2TP exists at the data link layer
(layer two) in the OSI model thus the origin of its name.
Like PPTP, L2TP supports non-IP clients. It also fails to define an encryption
standard. However, L2TP supports non-Internet based VPNs including frame relay, ATM,
and SONET.
28
2.3.5 SECURITY
complete VPN protocol solution, or it can used simply as the encryption scheme within L2TP
or PPTP. IPsec exists at the network layer (layer three) in OSI unlike the SSL and TLS which
exist only on the application layer and thereby provides security over the entire
communication link.
IPsec extends standard IP for the purpose of supporting more secure Internet-based
services (including, but not limited to, VPNs). IPsec specifically protects against "man in the
middle attacks" by hiding IP addresses that would otherwise appear on the wire.
The IPsec can work in either between two end systems namely the Client and the
Server or between two Routers . The former case is called the “Transport Mode” and the
The Transport Mode enforces the IPsec policies for traffic between systems and
supports Windows 2000 security. This is the default mode for IPsec.
The Tunnel Mode enforces IPsec policies for all Internet traffic and supports legacy
operating systems predominantly. This supports point-to-point security and specifies tunnel
In order to explain the scenario of the IPsec we shall consider the communication
29
There are two types of providing authentication SHA – Secured Hash Algorithm and
NOTE:
We will be able to show how to enable the IPsec in a Windows 2000 Server or Client
A remote employee wants to connect into the corporate network and access their
30
Step 1. The remote user dials into their local ISP and logs into the ISP’s network as usual.
Step 2. When connectivity to the corporate network is desired, the user initiates a tunnel
request to the destination Security server on the corporate network. The Security server
Step 3. The user then sends data through the tunnel which encrypted by the VPN software
31
Step 4. The destination Security server receives the encrypted data and decrypts. The
Security server then forwards the decrypted data packets onto the corporate network. Any
information sent back to the Remote user is also encrypted before being sent over the
Internet.
The figure below illustrates that VPN software can be used from any location through
32
2.3.7 Certificate Authority:
Certificate authorities usually have some kind of agreement with a financial institution which
provides the information used to confirm an individual's identity. Digital certificates are used
in a network security system to guarantee that the two parties exchanging information are
include its owner's public key and name, the expiration date of the certificate, or other
information. There are many certificate authorities on the Internet, though VeriSign is the
best-known example.
A certification authority accepts requests for certificates and grants them once it
determines that the request is genuine. (There may also be the small matter of a fee.) It plays
the role of what is generally known as a 'trusted third party', certifying the identity of one
party to another.
33
A certificate authority keeps a complete list of all certificates it has ever issued and
Any user should be able to request the status of any certificate a CA has issued. Any
user should also be able to look up a certificate by user name (or host name, for a server)
organizations to issue their own certificates for their own members of staff. In such an
instance, the company itself is the CA. In order for these certificates to be trusted by third
parties, the company will itself seek a certificate from another CA - who may in turn need to
Digital Certificates occasionally need to be revoked before their specified expiry date. There
34
If any of these happen, the certificate can no longer be trusted. A CRL is the
mechanism by which people can be certain that a certificate is still valid. It is nothing more
than a list of digital certificate serial numbers stored in a special directory (probably an
LDAP directory), although it could contain additional information such as the reason for
revocation. If the serial number is in the list, the associated certificate has been revoked.
1.2.6.3.2 PKI
PKI stands for Public Key Infrastructure. It is the software used to manage and control the
numbers to provide a pair of encryption keys. One of these keys is used to encrypt a message
that can only be decrypted by the other related key. One is kept secret by the owner while the
2.3.8 Routers
Routers are devices that inter connect complex LAN’s and WAN’s that operate at
Layer 3 of OSI model. It employees logical addressing technique for routing data. The routers
can handle large networks. The information to reach the remote networks is maintained on
the routing table, based on which the routing decisions are made. The routing table can be
built using.
This is done by entering the CLI command line interface) manually creating
35
RIP –The route is decided by taking into account the administrative distance
IGRP – The route is decided by the environment conditions like bandwidth, delay etc.
• Encryption
• Strong authentication
This involves the analysis of all the client and servers so as to identify the various IP
addresses and then configure them into the router by means of # functions. This serves the
36
Figure shows a connection of two Routers showing the various IP addresses of all the
Let’s consider from the figure that we need to configure the Router. A within the
network. Here the configuration refers to the preparing of the Routing table which is very
The server is dedicated for the application and contains the entire list of clients. It
provides the clients the to access the modules only if they receive certificates.
37
Certification for Client
The certificate for accessing the application is provided to the client by examining the
status of the clients with respect to management. The users can access the modules in the
following manner.
The clients receive the certificate ID if they are authorized. Else the request will be rejected.
38
2.4 System Design And Development
CERTIFICATE LOGIN
CLIENT LOGIN
39
ENQUIRY TABLE
CLIENT DETAILS
40
REGISTRATION
SALARY DETAILS
41
TRAINING
Sends the
to Client
Context Flow Diagram:
server
42
Overall Module:
ADMIN LOGIN
MARKETING LOGIN
SERVER
TRAINING LOGIN
User Module
Client Server DB
Certificate
Login
Admin module
43
Admin login
Office
Staff details
Admin main
Enquiry
Attendance
Registration
Course details
Salary details
Marketing module:
Marketing login
Marketing main
Client details
Add client
44
Training module
J2EE
TRAINING MODULE BATCH
CALL
COURSE CENTER
DETAIL
S/W
TESTING
NETWORKING
45
2.5 System Testing:
represents the review of specification, design and code generation. Once the source code has
been generated the program should be executed before the customer gets it with the specific
intent of finding and removing all errors, tests must be conducted systematically and tests
Testing techniques provides systematic guidance for designing tests. To uncover the
errors in program in behavior function and performance. The following steps have to be
followed.
Execute the input and output domains of the program to uncover errors.
During testing the system is used experimentally to ensure that the software does not
fail, i.e. it will run according to the speciation and in the way the users expects. Preparation of
the data plays a vital role in the system testing. Different set of data are generated and the
system under study is tested using data. While testing using data errors are again uncovered
Types of testing
Unit Testing
Integration Testing
Validation Testing
Output Testing
46
2.5.1 Unit Testing
Unit testing focuses verification efforts on smallest unit of design and the
module. This is known as module testing. Each module is tested separately. Different
modules of the project such as remote desktop connecting, spy mode activity, client system
controls are tested separately. Each module, like remote desktop connecting is to be tested
as they were connected with their required clients. Similarly the spy mode activity module
and client system controls modules should be tested. Each and every function of every
module is tested and is found to be working satisfactorily as regard to the expected output
architecture. Data can be lost across the interfaces; one module may have an adverse effect
on other. Thus integration testing is a systematic testing for constructing tests to uncover
errors within the interface. Integration testing enables to decide whether the IP address has
been displayed and whether the desktop is connected. Again it checks for the remote client
for the proper continues signals. In this project all the modules are combined and the
requirements analysis is validated against the software that has been constructed. The
validation that has been identified such as project team and bug administration has been
tested. This test provides the final assurance that the software meets all functional,
behavioral and performance requirements. The errors, which are uncovered during
47
No system could be useful it does not produce the required output in the specific
format. The outputs generated or displayed by the system under consideration are tested
along the users about the format required by them. Output testing does not result in any
User acceptance of the system is the key factor of success. The system under
consideration is tested for user acceptance by constantly; keeping in touch with the
prospective system users at time of developing and making changes whatever required.
The final and most important phase I the system life cycle is the implementation
of the new system. The term implementation has different meanings ranging from
connection of a basic application to a complete replacement includes all the activities that
take place to connect from old system to new. The new system may be totally replacing an
The method of implementation and time scale to be adopted are found out
initially. Next the system is properly tested and at the same time the users are trained in the
the organization using the new system but it will prevent improper installation. The
Careful planning
48
2.7 SOURCE CODE
MAIN
<html>
<body bgcolor="pink">
<center>
<BR>
<h2>Login Form</h2>
<br>
<table cellspacing="30">
</td></tr>
</table>
</center>
</form>
</body>
</html>
CERTIFICATE
<%@page import="java.sql.*"%>
<%
String user=request.getParameter("user");
String pass=request.getParameter("pass");
String id;
System.out.println(pass);
49
Connection con=null;
PreparedStatement pr=null;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
pr.setString(1,pass);
pr.setString(2,user);
ResultSet rs=pr.executeQuery();
if(rs.next())
System.out.println(cid);
%>
<%
System.out.println(rs.getString(1));
con.close();
catch(Exception ae)
%>
</body>
</html>
50
CID
<html>
<body>
CERTIFICATE
System.out.println(id);
%>
</form>
</body>
</html>
LOGIN
<html>
<body bgcolor="Peachpuff">
<center>
<BR>
<h2>Login Form</h2>
<br>
<table cellspacing="30">
51
<tr><td>Login</td><td><select name="login">
<option value="Administrator">Administrator</option>
<option value="Marketing">Marketing</option>
<option value="Faculty">Faculty</option>
</select></td></tr>
</table>
</center>
</body>
</html>
LOGIN.JSP
<%@page import="java.sql.*"%>
<%
String log=request.getParameter("login");
String pass=request.getParameter("pass");
Connection con=null;
PreparedStatement pr=null;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
pr.setString(1,pass);
ResultSet rs=pr.executeQuery();
rs.next();
System.out.println(rs.getString(1));
System.out.println(log);
String s1=rs.getString(1);
52
System.out.println("before");
if(s1.equals(log))
System.out.println("a");
%>
<jsp:forward page="Admin.html"/>
<%
else
System.out.println("b");
%>
<jsp:forward page="Marketing.html"/>
<%
con.close();
catch(Exception ae)
%>
</body>
</html>
ADMIN
<html>
<ul>
<font size=4>
53
<li><b><a href="Enquiry1.html">Enquiry form</a></b><br></li>
<br>
<br>
<br>
</font>
</ul>
<br>
<ul>
<font size=4>
<li><b><a href="staffattendance.html">Attendance</a></b><br></li>
<br>
</font>
</ul>
</body>
</html>
REGISTRATION
<%@page import="java.sql.*"%>
<%
String log=request.getParameter("login");
String pass=request.getParameter("pass");
Connection con=null;
PreparedStatement pr=null;
</body>
</html>
REGISTRATION 1
54
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
batchtimings='10am to 12pm'");
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
55
{
out.println("error");
%>
</table>
</body>
</html>
REGISTRATION 2
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
</html>
REGISTRATION 3
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
56
{
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
batchtimings='2pm to 4pm'");
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
%>
</table>
</body>
</html>
REGISTRATION 4
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
57
<CENTER><B><h3> J2EE BATCH IV STUDENT LIST </H3>
<CENTER>
</html>
REGISTRATION 5
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
58
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
%>
</table>
</body>
</html>
REGISTRATION 6
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
59
rs=stat.executeQuery("select regno,name,coursename from registration where coursename='Software
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
%>
</table>
</body>
</html>
REGISTRATION 6
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
60
{
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
%>
</table>
</body>
</html>
REGISTRATION 7
<%@page import="java.sql.*"%>
<html>
61
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
62
}
%>
ENQUIRY
<html>
<body bgcolor="Peachpuff">
<SCRIPT LANGUAGE="JavaScript">
function valid(form)
var field1=form.name;
var field2=form.address;
var field3=form.phone;
var field4=form.mphone;
var field5=form.email;
var field6=form.qualification;
var field7=form.regcourse;
var field8=form.timings;
var field9=form.reference;
name=field1.value;
address=field2.value;
phone=field3.value;
mphone=field4.value;
email=field5.value;
qualification=field6.value;
regcourse=field7.value;
timings=field8.value;
reference=field9.value;
alert("hai1");
if(name.length==0)
63
field1.focus();
return false;
else if(address.length==0)
field2.focus();
return false;
else if(phone.length==0)
field3.focus();
return false;
else if(mphone.length==0)
field4.focus();
return false;
else if(email.length==0)
field5.focus();
return false;
else if(qualification.length==0)
64
field6.focus();
return false;
else if(regcourse.length==0)
field7.focus();
return false;
else if(timings.length==0)
field8.focus();
return false;
else if(reference.length==0)
field9.focus();
return false;
</SCRIPT>
<center>
<h2><center><u>Enquiry form</u></center></h2>
<table border=0>
<tr>
65
<td>
<table border=0>
<tr>
<tr>
<tr>
<td><h4>Address:</h4></td><td><textareaname="address"rows=3cols=25></textarea></td>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
</table>
</td>
<td valign=top>
<table border=0>
<tr>
<tr>
<tr>
<option value="J2EE">J2EE</option>
<option value="Networking">Networking</option>
66
</select> </td>
<tr>
<tr>
</select></td>
<tr>
<tr>
<tr>
</table>
</td>
</tr>
</table>
</center>
<p><center> <inputtype="submit" value="Submit">
<inputtype="reset" value="Reset"></center></p>
</p>
</form>
</body>
</html>
STAFF ATTENDANCE
<html>
<body bgcolor="Peachpuff">
<SCRIPT LANGUAGE="JavaScript">
function valid(form)
67
{
var field1=form.number;
var field2=form.ename;
number=field1.value;
ename=field2.value;
if (number.length==0)
field1.focus();
return false;
else if(ename.length==0)
field2.focus();
return false;
</SCRIPT>
<body>
<center>
<br>
<br>
<br>
<br>
<tr>
<tr>
<tr>
68
<table>
<tr>
<tr>
<tr>
<tr><tr>
<tr>
<tr>
<tr>
<tr>
<tr>
</table>
<center>
<br>
</center>
</form>
</body>
</html>
STAFF ATTENDANCE.JSP
<%@page import="java.util.*"%>
<%
String empid=request.getParameter("number");
String name=request.getParameter("ename");
st.set(empid,name);
69
st.insert();
out.println("Inserted successfully");
%>
ADD CLIENT
<html>
<body bgcolor="Peachpuff">
<SCRIPT LANGUAGE="JavaScript">
function valid(form)
var field1=form.company;
var field2=form.address;
var field3=form.phone;
var field4=form.mail;
var field5=form.person;
company=field1.value;
address=field2.value;
phone=field3.value;
mail=field4.value;
person=field5.value;
if (company.length==0)
field1.focus();
return false;
else if(address.length==0)
field2.focus();
70
return false;
else if(phone.length==0)
field3.focus();
return false;
else if(mail.length==0)
field4.focus();
return false;
else if(person.length==0)
field5.focus();
return false;
</SCRIPT>
<h2><center>Add Client</center></h2>
<center>
<table cellspacing="20">
<tr>
</tr>
71
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</center>
</form>
</body>
</html>
ADD CLIENT.JSP
<%@page import="java.util.*"%>
<%
72
String company=request.getParameter("company");
String address=request.getParameter("address");
String phone=request.getParameter("phone");
String mail=request.getParameter("mail");
String person=request.getParameter("person");
val.set(company,address,phone,mail,person);
val.insert();
out.println("inserted successfully");
%>
CLIENT DETAILS.JSP
<%@page import="java.util.*"%>
<html>
<body bgcolor="Peachpuff">
<h2><center><u>Client Details</u></center></h2>
<form name=booksdet>
<center>
<tr>
<td>Company</td>
<td>Address</td>
<td>Phone</td>
<td>MailID</td>
<td>Contact Person</td>
</tr>
<%
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
73
Connection con=DriverManager.getConnection("jdbc:odbc:central");
ResultSet rs=pr.executeQuery();
while(rs.next())
%>
<tr>
<td>
<%=rs.getString(1)%>
</td>
<td>
<%=rs.getString(2)%>
</td>
<td>
<%=rs.getString(3)%>
</td>
<td>
<%=rs.getString(4)%>
</td>
<td>
<%=rs.getString(5)%>
</td>
</tr>
<%
catch(Exception e)
out.println("error"+ e);
74
%>
</table>
</center>
</form>
</body>
</html>
ADD PLACEMENT
<%@page import="java.util.*"%>
<%
String name=request.getParameter("name");
String placement=request.getParameter("placement");
String company=request.getParameter("company");
String person=request.getParameter("person");
String date=request.getParameter("date");
val.set(name,placement,company,person,date);
val.insert();
out.println("inserted successfully");
%>
COURSE DETAILS
<html>
<body bgcolor="Peachpuff">
<form name=coursedet>
<center>
75
<table border=0>
<tr>
<td><h2><a href="J2EE.html">J2EE</a></h2></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><h2><a href="Networking.html">Networking</a></h2></td>
</tr>
</table>
</center>
</form>
</body>
</html>
MARKETING
<html>
size=5><b>Marketing</b></font>
<ul>
<font size=4>
</font>
</ul>
76
</body>
</html>
PROJECT
<html>
<font size=5><b><u>Projects</u></font>
<form name=projectdet1>
<center>
<table border=0>
<tr>
</tr>
<tr>
<td><h2>MultiThreaded System</h2></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><h2>Voice Conferencing</h2></td>
</tr>
<tr>
</tr>
<tr>
</tr>
77
<tr>
</tr>
</table>
</center>
</form>
</body>
</html>
J2E
<html>
<body bgcolor="Peachpuff">
<h1><center><u>J2EE Training</center></h1>
<h2><center><u>Batch Timings</u></center></h2>
<form name=batchdet>
<center>
<tr>
<th><font size=5><center>Timing</center></font></th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
78
<td><font size=4><b><center><a href="register3.jsp">Batch 3</a></center></b></font></td>
</tr>
<tr>
</tr>
</table>
</center>
</form>
</body>
</html>
REGISTRATION-J2EE
<%@page import="java.sql.*"%>
<html>
<body bgcolor="Peachpuff">
<CENTER>
<tr><td>RegNo</td><td>Name</td><td>Course</td><tr>
<%
try
Connection con=null;
Statement stat=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
stat=con.createStatement();
79
rs=stat.executeQuery("select regno,name,coursename from registration where
while(rs.next())
%>
<tr><td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(3)%></td></tr>
<%
catch(Exception e)
out.println("error");
%>
</table>
</body>
</html>
ADD CLIENT.JAVA
package centre;
import java.util.*;
import java.sql.*;
import java.lang.*;
80
public ResultSet rs=null;
this.Company=Company;
this.Address=Address;
this.Phone=Phone;
this.Mail=Mail;
this.Person=Person;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
}catch(Exception e){}
try
Query="insert into ClientDetails values(' "+Company+" ',' "+Address+" ',' "+Phone+" ',' "+Mail+" ','
"+Person+" ')";
st=con.createStatement();
st.executeQuery(Query);
}catch(Exception e){}
81
SALARY.JAVA
package centre;
import java.util.*;
import java.sql.*;
import java.lang.*;
this.empno=empno;
this.empname=empname;
this.doj=doj;
this.pay=pay;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
}catch(Exception e){}
82
public void insert()
try
Query="insert into salarydetails values(' "+empno+" ',' "+empname+" ',' "+doj+" ',' "+pay+" ')";
st=con.createStatement();
st.executeQuery(Query);
}catch(Exception e){}
DCOURSE.JAVA
package centre;
import java.util.*;
import java.sql.*;
import java.lang.*;
83
this.courseno=courseno;
this.cname=cname;
this.amount=amount;
this.duration=duration;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:central");
}catch(Exception e){}
try
Query="insert into coursedetails values(' "+courseno+" ',' "+cname+" ',' "+amount+" ',' "+duration+"
')";
st=con.createStatement();
st.executeQuery(Query);
}catch(Exception e){}
ADDPALCEMENT.JAVA
package centre;
import java.util.*;
import java.sql.*;
import java.lang.*;
84
public class addplacement
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
try
Query="insert into PlacementDetails values(' "+name+" ',' "+placement+" ',' "+company+" ','
st=con.createStatement();
st.executeQuery(Query);
}catch(Exception e){}
85
2.8 Screen shot
OUTPUT
CLIENT LOGIN
86
ADMIN PAGE
ENQUIRY
87
REGISTRATION
COURSE DETAILS
88
SALARY
MARKETING
89
ADDCLIENT
PLACEMENT
90
J2EE TRAINING
PROJECTS
91
CONCLUSION
92
3. CONCLUSION
The “Virtual Private Network (VPN)” has emerged as one of the leading technologies
at present and has attracted the attention of many organizations looking to both expand their
This paper deals with the upcoming technology, VPN - Virtual Private Network
which has proved itself to be lot reliable in transferring data between remote places via a
Data Security
The VPN has the ability of providing connection between the user (client) & the
server of the organization not within the workplace itself but from home too with the data
Digital certificates are used in a network security system to guarantee that the two
parties exchanging information are really who they claim to be. A certificate authority keeps
a complete list of all certificates it has ever issued and information on their status: valid,
expired, or revoked.
93
REFERENCES
S.Sudarshan
Websites
www.wikipedia.org
www.internetwk.com
www.bitpipe.com
www.howstuffworks.com
www.securitydogs.com
94