0% found this document useful (0 votes)
8 views20 pages

VPN_server_project

The document outlines a project for designing and deploying a secure VPN server using OpenVPN on a Linux-based system, focusing on enabling encrypted remote access to internal resources. It includes sections on objectives, tools, implementation steps, testing, and future enhancements. The project demonstrates the practical application of VPNs for data privacy and secure communication in various settings.

Uploaded by

emanrajput871
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views20 pages

VPN_server_project

The document outlines a project for designing and deploying a secure VPN server using OpenVPN on a Linux-based system, focusing on enabling encrypted remote access to internal resources. It includes sections on objectives, tools, implementation steps, testing, and future enhancements. The project demonstrates the practical application of VPNs for data privacy and secure communication in various settings.

Uploaded by

emanrajput871
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

VPN server project

By:

• Aqsa
• Ali.
• Eman.
• Yashfa.
Project outline:
• Project Title
• Abstract
• Introduction
• Objectives
• Tools & Technologies
• System Architecture
• Implementation (with commands)
• Testing
• Conclusion
• Future Scope
• References
• Code source
• How server works with code.
What is a VPN Server?

• A VPN (Virtual Private Network) server lets users connect


to a private network securely over the internet.
• It encrypts the data between the user and the network,
so it’s safe from hackers or snoopers.
🛡 Abstract

In this project, we designed and deployed a secure Virtual Private


Network (VPN) server using OpenVPN on a Linux-based system.
The VPN allows remote users to access internal network resources
securely via encrypted connections. The implementation involves
generating encryption keys, configuring server and client settings,
and validating connectivity. This project demonstrates the practical
application of VPNs in educational institutions to ensure data
privacy and secure remote access.
🛡 Introduction
• With the increasing demand for secure access to internal
resources from off-campus locations. A VPN enables encrypted
communication over the internet.

• This project focuses on building a VPN server using OpenVPN, an


open-source and highly configurable solution. We configured a
VPN server on Ubuntu, generated secure certificates, and set up
a client to test end-to-end connectivity.
VPN SERver code SERver client based code
running Running
🛡 Objectives

• To understand the principles of VPNs and encryption.


• To install and configure a VPN server using OpenVPN.
• To generate and manage secure client-server certificates.
• To test connectivity from a remote client.
• To evaluate the performance and security of the VPN.
🛡 Tools & Technologies

Table:
Tool Purpose

Ubuntu Server Host operating system for the VPN

OpenVPN VPN server software

Easy-RSA Tool for managing certificates

UFW Firewall configuration

OpenVPN GUI Client software for Windows

Wireshark (Optional) Network traffic analysis


🛡 System Architecture

• VPN Server (Ubuntu + OpenVPN)


• VPN Client (Windows/Linux/Android)
• CA (Certificate Authority) for key generation
• Secure Tunnel over UDP/1194
🛡 Implementation

1. Update the System:


sudo apt install openvpn easy-rsa -y

2. Install OpenVPN and Easy-RSA:


sudo apt install openvpn easy-rsa -y

3. Set Up Certificate Infrastructure:


make-cadir ~/openvpn-ca
cd ~/openvpn-ca
./easyrsa init-pki
./easyrsa build-ca
./easyrsa build-server-full server nopass
./easyrsa build-client-full client1 nopass
./easyrsa gen-dh
openvpn --genkey --secret ta.key
4. Copy Certificates and Keys:
– sudo cp pki/ca.crt pki/private/server.key pki/issued/server.crt /etc/openvpn/
– sudo cp dh.pem ta.key /etc/openvpn/

5. Configure the Server:


• sudo cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/
• sudo gzip -d /etc/openvpn/server.conf.gz
• sudo nano /etc/openvpn/server.conf
🔧 Edit lines in server.conf:
• ca ca.crt
• cert server.crt
• key server.key
• dh dh.pem
• tls-auth ta.key 0
• cipher AES-256-CBC
• user nobody
• group nogroup
• 6. Enable IP Forwarding
– echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
– sudo sysctl -p

• 7. Configure the Firewall (UFW)


sudo ufw allow 1194/udp
sudo ufw allow OpenSSH
sudo ufw enable
Edit /etc/ufw/before.rules and add NAT settings:
*nat
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
COMMIT

Change /etc/default/ufw:
DEFAULT_FORWARD_POLICY="ACCEPT"
8. Start the VPN Server:
– sudo systemctl start openvpn@server
– sudo systemctl enable openvpn@server

9. Client Configuration:
Prepare a .ovpn file using:
client1.crt
client1.key
ca.crt
ta.key
📁 client.ovpn example:
client
dev tun
proto udp
remote <Your-Server-IP> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
tls-auth ta.key 1
cipher AES-256-CBC
verb 3
How OpenVPN
server works:

The client encrypts


messages using
AES, and sends
them to a server
running locally.The
server decrypts and
prints each
message, showing
secure
communication over
a socket connection.
🛡 Testing

• Use https://whatismyipaddress.com to check IP change.

• Use ping to test connectivity to internal resources.

• Use Wireshark (optional) to verify encrypted tunnel.

✅ Successful test results:

• Client connects without error.

• IP changes to VPN server IP.

• Data transmission is encrypted.


🛡 Conclusion & Future Scope

1. This project successfully demonstrated the deployment of a secure VPN using OpenVPN. It
enables encrypted, remote access to internal resources, suitable for universities,
organizations, or personal use. OpenVPN proved to be a flexible and robust tool for VPN
implementations.

2. FS:

– Add a web-based management dashboard.


– Integrate user login with LDAP or Active Directory.
– Use WireGuard for lightweight and faster VPN.
– Enable monitoring and logging.
– Implement mobile push notification for logins
🛡 References

• OpenVPN Documentation
{https://openvpn.net/community-resources/}

• DigitalOcean VPN Guide


{https://www.digitalocean.com/community/tutorials}
• Ubuntu Man Pages:
man openvpn, man ufw
• YouTube Tutorials on OpenVPN Setup
“VPN SOURCE CODE”

Code language Java

Code running server CentOS

Source file :
SimplifiedVPNserver.java.

Code have 2 parts !


1.Clinet base server code

2. Server base user code .


Thank you !
any question ??

You might also like