SlideShare a Scribd company logo
1 of 7
Download to read offline
Efficient provisioning private network in a virtualized environment
Myungho Jung
myungho.jung@utah.edu
University of Utah
Nowadays, multiple virtual machines are running on a host and clients want concurrently access
their own guest OS. To save resources, we started this project from the assumption that a provider
only had a server with a public IP. After investigating solutions, it is concluded that Virtual Private
Network(VPN) provides not only secure connection but also flexible networks to users. In the
project, OpenVPN scripts that are implemented using Open vSwitch, Floodlight SDN controller,
and MySQL showed how to build and provision a secure network on a virtualized host. It simplified
the architecture and as a result, it is scalable to larger system like cloud computing.
I. INTRODUCTION
In a virtualized environment, users can build many
virtual machines on a server and need to access them
on isolated network. If a host runs a large number of
guest OS, it requires a lot of resources such as pub-
lic IP, listening ports, and memory for a server pro-
cesses. Even if it provides secure private networks,
it will waste unnecessary resources as the number of
users is growing.
To resolve the problem, we restricted the environ-
ment as there is only has a server with a public IP. Port
forwarding may be a solution; however, there should
be better approaches when it comes to flexible and
scalable system. Thus, it is also assumed that users
should be able to access any services without chang-
ing port numbers.
The problem can be resolved in different network
layers. First, in the network layer, routing table with
Network Address Translation(NAT) may be a solution.
Even if a server only has an IP address, packets can
be routed to designated virtual machines through NAT
rules. The router changes the destination IP depend-
ing on the source IP and vice versa. In addition, a
central server is necessary to authenticate users. For
example, an OAUTH2 server connected to the router
can change the table after authentication. Remote
Authentication Dial-In User Service(RADIUS) and sin-
gle sign-on(SSO) can also be a authentication server
for various services. Finally, a VPN server offers se-
curely isolated networks from outside. The problem
is that users connected to a server should be on the
same network even if they cannot communicate with
each other. For this project, various solutions are con-
sidered and compared, and finally, an bridged VPN
server integrated with OpenFlow is suggested.
II. PROBLEM STATEMENT
As the performance of computers have improved
and small virtual machines and containers are intro-
duced, the large number of hosts are running on a
machine. As a result, people started to need to oper-
ate many virtual machines on their own private net-
work. Although it would be a solution to run more
servers on a host, it is a waste of resources if a small
number of connections are concurrently made. Even
if a server only has a public IP and limited memory
capacity, there are various solutions to implement the
system. We will discuss on them in the next sections.
III. RELATED WORKS
Gang et al. designed a Single Sign-On system to
identify clients using IP address[11]. Even if the first
version was vulnerable to IP spoofing attack, they
overcame the problem by authenticating and encrypt-
ing packets with certificates.
RADIUS is another solution to centralize authenti-
cation for different services. FreeRADIUS[6] which is
an open source RADIUS project has been developed.
It can be applied to most Linux applications thanks
to a project integrating with Pluggable Authentication
Module(PAM).
Finally, VPN provides bidirectional authentication
between server and client. OpenVPN[10] is one of
the open source projects and it provides SSL-based
encryption and authentication. Therefore, the server
can trust IP or MAC address of clients and also detect
changes.
IV. APPROACH
There are three approaches to implement the sys-
tem. First, although each user’s packets destines to
the same IP address, the router in the server can mod-
ify destination and source IP addresses of packets. On
top of that, an authentication server is necessary to
guarantee that an attacker cannot spoof IP address.
VPN also makes it possible to provision isolated net-
work with authentication.
2
A. Routing by source IP address
FIG. 1. A router with NAT rules based on source IP address
As a naive approach, IP address can be used to iden-
tify users. It is appropriate when a server and clients
are connected with LAN and fixed IP address are allo-
cated. In the figure 1, the NAT rules are defined in the
router and it changes the source and destination IP
address of incoming and outgoing packets. However,
the problem is that IP address in packets is exposed
and easily spoofed by attackers. Therefore, additional
authentication mechanism is necessary to improve se-
curity.
B. Routing with authentication
FIG. 2. A router with authentication server
Second, a central server can authenticate users and
notify the router of the result. There are various so-
lutions to implement it. First, a RADIUS server can
act as a comprehensive authenticator. It helps to cen-
tralize users profiles into central database. It can be
applied to various Linux applications using PAM. Simi-
larly, Single Sign-On system can centralize the authen-
tication of services. Though most of them are devel-
oped for web services, Kerberos[8] based SSO can be
used as a central login system. Similarly, OAUTH2
server works for HTTP services.
These systems may provide secure access to a vir-
tual machine, they have common problems. First, it
needs two public IP or ports for authentication and
service. Otherwise, it would cause a problem when
a user’s IP address changes. Second, a user cannot
access multiple virtual machines with a public IP. Fi-
nally, even if the authentication system exists, source
and destination IP addresses on packets cannot be en-
crypted and it is vulnerable to man in the middle at-
tack. Therefore, IP address should be used as only
public key.
C. Virtual Private Network
FIG. 3. A VPN server connected to virtual machines
Users can access isolated network using VPN. It
provides private network with any number of virtual
machines. The problem is that the amount of required
memory is a multiple of users. It causes the server
to sharply slow down when a large number of users
concurrently access. However, a lot of memory will be
saved if we can route packets in the server.
To make the idea work, first solution is attaching
a VLAN tag to incoming packets and tap devices on
virtual machines of a user. Then, only matching pack-
ets can pass the tap device. However, there would
be a network performance issue if many users use dif-
ferent tags since packets should be broadcasted. An-
other problem is the number of possible tags is limited
as 4096 because of the number of allocated bits.
It is possible to separate networks if the network
traffic is controlled by OpenFlow. For this project,
an automated system is implemented using OpenVPN
scripts. The scripts are triggered when users connect,
disconnect, and change status like MAC address. The
system is efficient and secure because it only requires
a small amount of fixed pre-allocated memory and a
listening port, and provides isolated network for each
user. Also, it simplifies the server side which makes it
scalable and flexible.
V. IMPLEMENTATION
The system is implemented using OpenVPN and
tested on Ubuntu 14.04 LTS server with Xen hypervi-
sor. Virtual machines are automatically started when
3
users connect to VPN server. By doing so, the deploy-
ment process becomes simple, for example, new ver-
sion of virtual machines are served by uploading im-
age files on server and making a new connection. Af-
ter a user’s VPN tunnel is established, the user can
access his or her own virtual machines. It makes
users feel like their guest OS is always running on the
server. Because the default action in disconnection
is stopping virtual machines, some users may have a
problem in executing scheduled jobs or background
process. It will be dealt with in section VII. More than
a user can have the same subnet because not only is it
working on network layer 2 but also user bridges are
located in different network namespace, which pre-
vents from IP confliction between users.
A. Network Structure
After a user successfully authenticates to VPN
server, virtual machines become active with connec-
tion to a bridge. The figure 4. shows a case that three
users are connected to the network. In this example,
br0 is a Open vSwitch connected to tap device of VPN
server. And three bridges br-user1, br-user2, and
br-user3 are linked to the br0 through patch ports.
In the example, user 1 has access to VM1 and VM2,
user 2 has access to VM3 and VM4, and the user 3
has access to VM5 in the figure.
FIG. 4. An example of VPN network on server
A server and clients have a tap device and make
a connection with it. Although different clients are
connected to the same tap device, OpenFlows defined
on br0 pass frames to each user’s bridge and thus,
private network is isolated from each other. Even
if configuration files are distributed to clients, it is
not hard for users to change MAC address of tap
device. To prevent malicious activity like crafting
frames, OpenFlow[7] rules should be added to the
bridge br0 on VPN server to allow only valid pack-
ets, otherwise drop them. SDN controller helps to
create and manage flows and Floodlight[1] which is
open source controller is used in this project. When a
user is authenticated by VPN server, the server starts
the user’s virtual machines and adds flows in network
layer 2. Users can access their guest OS only after the
flows are inserted because every ARP and IP packet is
rejected by default. Though bridges are linked with
patch ports in this project because those are on the
same host, bridges in remote hosts can be connected
with tunnel which will be useful in the cloud system.
B. OpenVPN
OpenVPN supports bridged and routed mode which
are working on network layer 2 and 3, respectively.
In this project, bridged OpenVPN server is selected to
cooperate with Open vSwitch and OpenFlow. When
a user connects to VPN server, the server executes
scripts to authenticate user, create bridge, and add
flows. Fortunately, OpenVPN supports various plug-
ins to authenticate with external applications. In this
project, MySQL database is used for storing user pro-
file.
Next script in Listing 1. is triggered after a client is
successfully authenticated.
Listing 1. Script for client connection
#!/bin/sh
# Usage: connect.sh <central bridge> <user
bridge> <network namespace>
# Bridges
br-center = $1
br-user = $2
# Patch ports
p1 = ’$br-center’-to-’$br-user’
p2 = ’$br-user’-to-’$br-center’
# Network namespace
ns-user = $3
# Add patch ports
ovs-vsctl add-br $br-user
ovs-vsctl add-port $br-center $p1 
-- set interface $p1 type=patch 
options:peer=$p2
ovs-vsctl add-port $br-user $p2 
-- set interface $p2 type=patch 
options:peer=$p1
# Create network namespace and put bridge
ip netns add $ns-user
ip link set $br-user netns $ns-user
ip netns exec $ns-user ifconfig lo up
4
ip netns exec $ns-user ifconfig $br-user up
# Start virtual machines
start-vm.sh $username $br-user
# Add flows
add-openflow.sh $username $br-user
This script creates a new user bridge and adds patch
ports to it and the central bridge to link them. After
that, create new network namespace and put the user
bridge into it. Even if the two bridges are in different
network namespace, they can communicate with each
other through the patch port. However, we want to
only allow the owner to access virtual machines. To
do this, the last two scripts add flows after starting
the virtual machines on the bridge.
Listing 2. Script for client disconnection
#!/bin/sh
# Usage: disconnect.sh <central bridge> <user
bridge>
# Bridges
br-center = $1
br-user = $2
# Patch ports
patch = ’$br-center’-to-’$br-user’
# Stop virtual machines
stop-vm.sh $username $br-user
# Remove flows
del-openflow.sh $username $br-user
# Remove bridge and ports
ovs-vsctl del-br $br-user
ovs-vsctl del-port $br-center $patch
# Remove network namespace
ip netns del $ns-user
When a user disconnects, the server will stop the
virtual machines and remove the bridges. Although it
may cause performance issue if users frequently con-
nect and disconnect, it will save allocated memory and
improve network performance by maintaining only re-
quired bridges and flows. Scripts related to virtual
machines and OpenFlows will change depending on
hypervisor and SDN controller and thus, those are not
included in this paper.
C. Xen hypervisor and Rump kernels
In order to manage the status of virtual machines,
hypervisor is a useful tool providing a variety of APIs.
Xen[5] is one of the popular open source hypervisors
for virtual machines and compatible with most operat-
ing systems. However, it requires much computing re-
sources to run general virtual machines. To simulate
the environment where many virtual machines are
running on a host, Rump Kernel[2] which is uniker-
nel virtual machine with the NetBSD kernel is used.
Although the unikernel is similar to containers like
docker, it includes its own kernel like regular oper-
ating systems which makes the host secure from ker-
nel attack. Unikernel usually consists of an applica-
tion and required frameworks and thus, needs a small
amount of cpu and memory. In the project, the status
of rumpkernel is controlled by rumprun tool in Open-
VPN script.
D. Open vSwitch and Floodlight SDN controller
Open vSwitch[9] is a virtual switch providing
bridged network for virtual machines. Static Flow
Pusher which is one of applications of Floodlight helps
to manage flows. It provides REST API with json type
request and response which makes it easy to handle
data.
Since there is only a tap device on the server side,
we cannot trust any information in packets except
source IP address and TCP port thanks to SSL tunnel-
ing. First, we need 2 rules to drop every IP and ARP
packets by default. And, 4 rules per user are required
to be added to allow and route packets in both direc-
tions. The rules protect the server from attacks ma-
nipulating packets from both of VPN client and guest
OS.
FIG. 5. An example that two users connected to a server
In the figure 6, user 1’s packets should be passed
to br-user1 bridge and user 2’s packets should go to
br-user2. To accomplish it, next OpenFlow rules are
required be added to br0.
• Default drop rules
– priority: 1
– match
* protocol: IP, ARP
5
– action
* drop
• Flow for packets from user1
– priority: 10
– match
* in port: 5
* source MAC: 00:00:00:00:00:01
* protocol: IP, ARP
– Action
* output: port 6
• Flow for packets to user1
– priority: 10
– match
* in port: 6
* destination MAC: 00:00:00:00:00:01
* protocol: IP, ARP
– Action
* output: port 5
• Flow for packets from user2
– priority: 10
– match
* in port: 5
* source MAC: 00:00:00:00:00:02
* protocol: IP, ARP
– Action
* output: port 7
• Flow for packets to user2
– priority: 10
– match
* in port: 7
* destination MAC: 00:00:00:00:00:02
* protocol: IP, ARP
– Action
* output: port 5
These rules help to drop unnecessary and malicious
packets and for users to securely access their net-
work.
user_id username password mac_addr ip_addr
1 user1 ***** 00::01 10.0.0.10
2 user2 ***** 00::02 10.0.0.20
TABLE I. An example of users table
E. Database
MySQL server is required for storing user data and
authentication. First, user table is created at first and
a user is registered by inserting data into table. The
structure of the table looks like table I although it is
simplified.
Username and password are necessary to authen-
ticate users. MAC address should be updated when
a user connects, disconnects, or change it. By do-
ing so, the server can prevent from impersonating
other users. Actually, IP address is not required be-
cause users can change it without being noticed by
the server if it is bridged mode. However, IP spoof-
ing attack is useless because of flow rules in network
layer 2.
F. Sharing networks between users
Although users can share networks in client side,
there are advantages in connecting bridges in the
server. Networks can be simply linked by making a
connection between bridges by patch ports, VXLAN,
or GRE tunnel. First, it is secure because users don’t
have to expose address of their host running client
to others. And server can force to disconnect bridges
whenever the owner wants. In addition, it is beneficial
for network performance between virtual machines
because they can communicate without passing VPN
tunnel.
VI. SECURITY
Basically, private networks must be secure from out-
side as well as between users thanks to SSL tunnel-
ing based on certificates and OpenFlow rules. The
packet switching occurs in layer 2 network and each
virtual machines are connected to bridge through tap
devices. This makes it difficult to modify packets in
guest OS for the malicious purpose. On tap of that,
the entire network topology can be only seen and con-
trolled by host OS.
6
A. MAC address spoofing
Algorithm 1 Learn-address script
if operation = add or update then
if address already exists in user DB then
return failure
else
Update the user’s address
end if
else if operation = delete then
Change the user’s address to null
end if
return success
Flow rules are based on source and destination
MAC address and thus, attackers may try to spoof
MAC address to access other user’s network. How-
ever, if a user change the address of tap device, Open-
VPN detects the change and rejects the packets if the
address is already assigned to other user. To be spe-
cific, the learn-address script of OpenVPN server is
triggered when a client connects or changes MAC ad-
dress and it can refuse the connection by returning
failure code. OpenVPN passes the operation, address,
and user ID to the script as parameters. By using
this, if a new MAC address of a user overlaps with
one of other users connected, the server rejects the
later one.
B. Packet Crafting
On the guest OS, an attacker may try to manipulate
MAC address of packets and send them to other net-
work. However, the packets cannot pass the patch
port on the central bridge according to OpenFlow
rules. On top of that, users cannot access the network
devices on host OS. Of course, some hypervisors had
vulnerabilities escalating privileges from guest to host
OS like VENOM[3] before. It is already patched in
most of virtualizations and also it is beyond the scope
of this paper.
VII. DRAWBACKS
In the project, we anticipated that users want to
stop their virtual machines after VPN connection is
closed. However, some of the users may like to keep
running for scheduled jobs. Instead of stoping or
suspending the virtual hosts, minimizing hardware
resource would be better if the hypervisor supports
changing the virtual hardware of running guest OS.
And it will be restored to normal status when the user
comes back like sleep mode in laptop PC.
VIII. APPLICATION
A. Virtual Private Cloud
Even if the objective would be little different, one of
the real world problems related to the project is Vir-
tual Private Cloud(VPC)[4]. It creates and deploy vir-
tual machines on isolated network from other users.
And users can control the accessibility through NAT or
connect two networks through VPN tunnel. Although
some companies like Amazon support IPsec hardware
VPN for high security, it costs much as the number of
users increases. For small companies which cannot
afford VPN hardware, this approach would help them
to provide VPC services with limited resources.
B. Web service
FIG. 6. Deployment of web service using reverse proxy
Virtual machines in private network are hidden
from outside by default. To deploy web services, re-
verse proxy server is needed to run on VPN client
host. Most of the web server applications, such as
Apache and Nginx Web server, support reverse proxy
that distributes traffic to internal virtual machines de-
pending on IP address, domain name, or URL. Al-
though the internal network is rather fast, overall
network performance would decrease because every
packet from hosts in the external network should be
passed through VPN tunnel.
IX. FUTURE WORKS
Although it is a prototype and not scalable much,
it will be able be applied to the larger system after
combining with the cloud platform. It only requires
slight modification in the system.
A. Cloud Architecture
Although the implementation of this project is lim-
ited to build a virtual network in a host, it can be ex-
pandable to the cloud system because it is designed
7
in consideration of flexibility and scalability. In the
larger virtualized environment, two servers storing
user data and virtual machine images should be sepa-
rated. The figure 7 displays an example.
FIG. 7. The overall structure for cloud management system
For load balancing, multiple VPN servers will be
necessary. OpenVPN supports simple load balancing
by adding servers in configuration file. After authen-
tication, the management server will find idle hosts to
run virtual machines. Then, the server will create a
bridge and start virtual machines on the host. Finally,
users can access guest OS by connecting two bridges
in VPN and hyperviser servers with tunnel and adding
flows to allow packets.
X. CONCLUSION
Through the project, various methods to serve vir-
tual machines with limited resources are investigated.
In conclusion, VPN with OpenFlow is one of the best
systems when it comes to security and scalability al-
though routing packets by source IP with central au-
thentication server would be better in network per-
formance. In addition, it is showed that the system
is scalable enough to be applied to the virtual private
cloud system in the future. With the advent of uniker-
nels and Microservices, this system will be helpful to
save resources in virtulization on private networks.
[1] Project floodlight. http://www.projectfloodlight.
org/.
[2] Rump kernels. http://rumpkernel.org/.
[3] Venom. http://venom.crowdstrike.com/.
[4] Virtual private cloud. https://aws.amazon.com/vpc/.
[5] Paul Barham, Boris Dragovic, Keir Fraser, Steven
Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt,
and Andrew Warfield. Xen and the art of virtualization.
ACM SIGOPS Operating Systems Review, 37(5):164–
177, 2003.
[6] Alan DeKok. Freeradius, 2008.
[7] Nick McKeown, Tom Anderson, Hari Balakrishnan,
Guru Parulkar, Larry Peterson, Jennifer Rexford, Scott
Shenker, and Jonathan Turner. Openflow: enabling in-
novation in campus networks. ACM SIGCOMM Com-
puter Communication Review, 38(2):69–74, 2008.
[8] Steven P Miller, B Clifford Neuman, Jeffrey I Schiller,
and Jermoe H Saltzer. Kerberos authentication and au-
thorization system. In In Project Athena Technical Plan.
Citeseer, 1988.
[9] Ben Pfaff and Bruce Davie. The open vswitch database
management protocol. 2013.
[10] James Yonan. Openvpn, 2007.
[11] Gang Zhao, Dong Zheng, and Kefei Chen. Design of
single sign-on. In E-Commerce Technology for Dynamic
E-Business, 2004. IEEE International Conference on,
pages 253–256. IEEE, 2004.

More Related Content

What's hot

IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET Journal
 
MQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyMQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyShashank Kapoor
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Julien Vermillard
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct doxBaig Mirza
 
MQTT, Eclipse Paho and Java - Messaging for the Internet of Things
MQTT, Eclipse Paho and Java - Messaging for the Internet of ThingsMQTT, Eclipse Paho and Java - Messaging for the Internet of Things
MQTT, Eclipse Paho and Java - Messaging for the Internet of ThingsAndy Piper
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of thingsCharles Gibbons
 
Network Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data CentersNetwork Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data Centersrjain51
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT Vpkaviya
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolFatih Özlü
 
[Retired] routing on the host an introduction – cumulus networks® knowledge ...
[Retired] routing on the host  an introduction – cumulus networks® knowledge ...[Retired] routing on the host  an introduction – cumulus networks® knowledge ...
[Retired] routing on the host an introduction – cumulus networks® knowledge ...doudadouda
 

What's hot (20)

IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
Web server
Web serverWeb server
Web server
 
Mqtt
MqttMqtt
Mqtt
 
MQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyMQTT Protocol: IOT Technology
MQTT Protocol: IOT Technology
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct dox
 
MQTT, Eclipse Paho and Java - Messaging for the Internet of Things
MQTT, Eclipse Paho and Java - Messaging for the Internet of ThingsMQTT, Eclipse Paho and Java - Messaging for the Internet of Things
MQTT, Eclipse Paho and Java - Messaging for the Internet of Things
 
Chapter1 intro
Chapter1 introChapter1 intro
Chapter1 intro
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Network Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data CentersNetwork Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data Centers
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 
Chapter3 transport
Chapter3 transportChapter3 transport
Chapter3 transport
 
Android Implementation using MQTT Protocol
Android Implementation using MQTT ProtocolAndroid Implementation using MQTT Protocol
Android Implementation using MQTT Protocol
 
[Retired] routing on the host an introduction – cumulus networks® knowledge ...
[Retired] routing on the host  an introduction – cumulus networks® knowledge ...[Retired] routing on the host  an introduction – cumulus networks® knowledge ...
[Retired] routing on the host an introduction – cumulus networks® knowledge ...
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 

Similar to Efficient provisioning private network in a virtualized environment

VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network) Netwax Lab
 
Site to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestSite to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestChanaka Lasantha
 
Site to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbSite to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbChanaka Lasantha
 
CV-Chapitre8 (2).pdf
CV-Chapitre8 (2).pdfCV-Chapitre8 (2).pdf
CV-Chapitre8 (2).pdfoumaimaziat1
 
Clientserver Presentation
Clientserver PresentationClientserver Presentation
Clientserver PresentationTuhin_Das
 
Cohesive Networks Support Docs: Welcome to VNS3 3.5
Cohesive Networks Support Docs: Welcome to VNS3 3.5 Cohesive Networks Support Docs: Welcome to VNS3 3.5
Cohesive Networks Support Docs: Welcome to VNS3 3.5 Cohesive Networks
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkRicha Singh
 
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALAVIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALASaikiran Panjala
 
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...Tal Lavian Ph.D.
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Virtual private network
Virtual private network Virtual private network
Virtual private network Parth Akbari
 
Site to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authSite to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authChanaka Lasantha
 
VPN & FIREWALL
VPN & FIREWALLVPN & FIREWALL
VPN & FIREWALLMoin Islam
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private NetworkRajan Kumar
 

Similar to Efficient provisioning private network in a virtualized environment (20)

VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network)
 
Site to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latestSite to-multi site open vpn solution-latest
Site to-multi site open vpn solution-latest
 
draft_myungho
draft_myunghodraft_myungho
draft_myungho
 
Site to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql dbSite to-multi site open vpn solution with mysql db
Site to-multi site open vpn solution with mysql db
 
CV-Chapitre8 (2).pdf
CV-Chapitre8 (2).pdfCV-Chapitre8 (2).pdf
CV-Chapitre8 (2).pdf
 
Buildvpn1.pdf
Buildvpn1.pdfBuildvpn1.pdf
Buildvpn1.pdf
 
Clientserver Presentation
Clientserver PresentationClientserver Presentation
Clientserver Presentation
 
Cohesive Networks Support Docs: Welcome to VNS3 3.5
Cohesive Networks Support Docs: Welcome to VNS3 3.5 Cohesive Networks Support Docs: Welcome to VNS3 3.5
Cohesive Networks Support Docs: Welcome to VNS3 3.5
 
0130225347
01302253470130225347
0130225347
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALAVIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
VIRTUAL PRIVATE NETWORKS BY SAIKIRAN PANJALA
 
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...
Popeye - Using Fine-grained Network Access Control to Support Mobile Users an...
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Virtual private network
Virtual private network Virtual private network
Virtual private network
 
Site to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory authSite to-multi site open vpn solution. with active directory auth
Site to-multi site open vpn solution. with active directory auth
 
VPN & FIREWALL
VPN & FIREWALLVPN & FIREWALL
VPN & FIREWALL
 
Virtual Private Network
Virtual Private NetworkVirtual Private Network
Virtual Private Network
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
04 Client Server Computing
04 Client Server Computing04 Client Server Computing
04 Client Server Computing
 
G017234450
G017234450G017234450
G017234450
 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 

Recently uploaded (20)

🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 

Efficient provisioning private network in a virtualized environment

  • 1. Efficient provisioning private network in a virtualized environment Myungho Jung myungho.jung@utah.edu University of Utah Nowadays, multiple virtual machines are running on a host and clients want concurrently access their own guest OS. To save resources, we started this project from the assumption that a provider only had a server with a public IP. After investigating solutions, it is concluded that Virtual Private Network(VPN) provides not only secure connection but also flexible networks to users. In the project, OpenVPN scripts that are implemented using Open vSwitch, Floodlight SDN controller, and MySQL showed how to build and provision a secure network on a virtualized host. It simplified the architecture and as a result, it is scalable to larger system like cloud computing. I. INTRODUCTION In a virtualized environment, users can build many virtual machines on a server and need to access them on isolated network. If a host runs a large number of guest OS, it requires a lot of resources such as pub- lic IP, listening ports, and memory for a server pro- cesses. Even if it provides secure private networks, it will waste unnecessary resources as the number of users is growing. To resolve the problem, we restricted the environ- ment as there is only has a server with a public IP. Port forwarding may be a solution; however, there should be better approaches when it comes to flexible and scalable system. Thus, it is also assumed that users should be able to access any services without chang- ing port numbers. The problem can be resolved in different network layers. First, in the network layer, routing table with Network Address Translation(NAT) may be a solution. Even if a server only has an IP address, packets can be routed to designated virtual machines through NAT rules. The router changes the destination IP depend- ing on the source IP and vice versa. In addition, a central server is necessary to authenticate users. For example, an OAUTH2 server connected to the router can change the table after authentication. Remote Authentication Dial-In User Service(RADIUS) and sin- gle sign-on(SSO) can also be a authentication server for various services. Finally, a VPN server offers se- curely isolated networks from outside. The problem is that users connected to a server should be on the same network even if they cannot communicate with each other. For this project, various solutions are con- sidered and compared, and finally, an bridged VPN server integrated with OpenFlow is suggested. II. PROBLEM STATEMENT As the performance of computers have improved and small virtual machines and containers are intro- duced, the large number of hosts are running on a machine. As a result, people started to need to oper- ate many virtual machines on their own private net- work. Although it would be a solution to run more servers on a host, it is a waste of resources if a small number of connections are concurrently made. Even if a server only has a public IP and limited memory capacity, there are various solutions to implement the system. We will discuss on them in the next sections. III. RELATED WORKS Gang et al. designed a Single Sign-On system to identify clients using IP address[11]. Even if the first version was vulnerable to IP spoofing attack, they overcame the problem by authenticating and encrypt- ing packets with certificates. RADIUS is another solution to centralize authenti- cation for different services. FreeRADIUS[6] which is an open source RADIUS project has been developed. It can be applied to most Linux applications thanks to a project integrating with Pluggable Authentication Module(PAM). Finally, VPN provides bidirectional authentication between server and client. OpenVPN[10] is one of the open source projects and it provides SSL-based encryption and authentication. Therefore, the server can trust IP or MAC address of clients and also detect changes. IV. APPROACH There are three approaches to implement the sys- tem. First, although each user’s packets destines to the same IP address, the router in the server can mod- ify destination and source IP addresses of packets. On top of that, an authentication server is necessary to guarantee that an attacker cannot spoof IP address. VPN also makes it possible to provision isolated net- work with authentication.
  • 2. 2 A. Routing by source IP address FIG. 1. A router with NAT rules based on source IP address As a naive approach, IP address can be used to iden- tify users. It is appropriate when a server and clients are connected with LAN and fixed IP address are allo- cated. In the figure 1, the NAT rules are defined in the router and it changes the source and destination IP address of incoming and outgoing packets. However, the problem is that IP address in packets is exposed and easily spoofed by attackers. Therefore, additional authentication mechanism is necessary to improve se- curity. B. Routing with authentication FIG. 2. A router with authentication server Second, a central server can authenticate users and notify the router of the result. There are various so- lutions to implement it. First, a RADIUS server can act as a comprehensive authenticator. It helps to cen- tralize users profiles into central database. It can be applied to various Linux applications using PAM. Simi- larly, Single Sign-On system can centralize the authen- tication of services. Though most of them are devel- oped for web services, Kerberos[8] based SSO can be used as a central login system. Similarly, OAUTH2 server works for HTTP services. These systems may provide secure access to a vir- tual machine, they have common problems. First, it needs two public IP or ports for authentication and service. Otherwise, it would cause a problem when a user’s IP address changes. Second, a user cannot access multiple virtual machines with a public IP. Fi- nally, even if the authentication system exists, source and destination IP addresses on packets cannot be en- crypted and it is vulnerable to man in the middle at- tack. Therefore, IP address should be used as only public key. C. Virtual Private Network FIG. 3. A VPN server connected to virtual machines Users can access isolated network using VPN. It provides private network with any number of virtual machines. The problem is that the amount of required memory is a multiple of users. It causes the server to sharply slow down when a large number of users concurrently access. However, a lot of memory will be saved if we can route packets in the server. To make the idea work, first solution is attaching a VLAN tag to incoming packets and tap devices on virtual machines of a user. Then, only matching pack- ets can pass the tap device. However, there would be a network performance issue if many users use dif- ferent tags since packets should be broadcasted. An- other problem is the number of possible tags is limited as 4096 because of the number of allocated bits. It is possible to separate networks if the network traffic is controlled by OpenFlow. For this project, an automated system is implemented using OpenVPN scripts. The scripts are triggered when users connect, disconnect, and change status like MAC address. The system is efficient and secure because it only requires a small amount of fixed pre-allocated memory and a listening port, and provides isolated network for each user. Also, it simplifies the server side which makes it scalable and flexible. V. IMPLEMENTATION The system is implemented using OpenVPN and tested on Ubuntu 14.04 LTS server with Xen hypervi- sor. Virtual machines are automatically started when
  • 3. 3 users connect to VPN server. By doing so, the deploy- ment process becomes simple, for example, new ver- sion of virtual machines are served by uploading im- age files on server and making a new connection. Af- ter a user’s VPN tunnel is established, the user can access his or her own virtual machines. It makes users feel like their guest OS is always running on the server. Because the default action in disconnection is stopping virtual machines, some users may have a problem in executing scheduled jobs or background process. It will be dealt with in section VII. More than a user can have the same subnet because not only is it working on network layer 2 but also user bridges are located in different network namespace, which pre- vents from IP confliction between users. A. Network Structure After a user successfully authenticates to VPN server, virtual machines become active with connec- tion to a bridge. The figure 4. shows a case that three users are connected to the network. In this example, br0 is a Open vSwitch connected to tap device of VPN server. And three bridges br-user1, br-user2, and br-user3 are linked to the br0 through patch ports. In the example, user 1 has access to VM1 and VM2, user 2 has access to VM3 and VM4, and the user 3 has access to VM5 in the figure. FIG. 4. An example of VPN network on server A server and clients have a tap device and make a connection with it. Although different clients are connected to the same tap device, OpenFlows defined on br0 pass frames to each user’s bridge and thus, private network is isolated from each other. Even if configuration files are distributed to clients, it is not hard for users to change MAC address of tap device. To prevent malicious activity like crafting frames, OpenFlow[7] rules should be added to the bridge br0 on VPN server to allow only valid pack- ets, otherwise drop them. SDN controller helps to create and manage flows and Floodlight[1] which is open source controller is used in this project. When a user is authenticated by VPN server, the server starts the user’s virtual machines and adds flows in network layer 2. Users can access their guest OS only after the flows are inserted because every ARP and IP packet is rejected by default. Though bridges are linked with patch ports in this project because those are on the same host, bridges in remote hosts can be connected with tunnel which will be useful in the cloud system. B. OpenVPN OpenVPN supports bridged and routed mode which are working on network layer 2 and 3, respectively. In this project, bridged OpenVPN server is selected to cooperate with Open vSwitch and OpenFlow. When a user connects to VPN server, the server executes scripts to authenticate user, create bridge, and add flows. Fortunately, OpenVPN supports various plug- ins to authenticate with external applications. In this project, MySQL database is used for storing user pro- file. Next script in Listing 1. is triggered after a client is successfully authenticated. Listing 1. Script for client connection #!/bin/sh # Usage: connect.sh <central bridge> <user bridge> <network namespace> # Bridges br-center = $1 br-user = $2 # Patch ports p1 = ’$br-center’-to-’$br-user’ p2 = ’$br-user’-to-’$br-center’ # Network namespace ns-user = $3 # Add patch ports ovs-vsctl add-br $br-user ovs-vsctl add-port $br-center $p1 -- set interface $p1 type=patch options:peer=$p2 ovs-vsctl add-port $br-user $p2 -- set interface $p2 type=patch options:peer=$p1 # Create network namespace and put bridge ip netns add $ns-user ip link set $br-user netns $ns-user ip netns exec $ns-user ifconfig lo up
  • 4. 4 ip netns exec $ns-user ifconfig $br-user up # Start virtual machines start-vm.sh $username $br-user # Add flows add-openflow.sh $username $br-user This script creates a new user bridge and adds patch ports to it and the central bridge to link them. After that, create new network namespace and put the user bridge into it. Even if the two bridges are in different network namespace, they can communicate with each other through the patch port. However, we want to only allow the owner to access virtual machines. To do this, the last two scripts add flows after starting the virtual machines on the bridge. Listing 2. Script for client disconnection #!/bin/sh # Usage: disconnect.sh <central bridge> <user bridge> # Bridges br-center = $1 br-user = $2 # Patch ports patch = ’$br-center’-to-’$br-user’ # Stop virtual machines stop-vm.sh $username $br-user # Remove flows del-openflow.sh $username $br-user # Remove bridge and ports ovs-vsctl del-br $br-user ovs-vsctl del-port $br-center $patch # Remove network namespace ip netns del $ns-user When a user disconnects, the server will stop the virtual machines and remove the bridges. Although it may cause performance issue if users frequently con- nect and disconnect, it will save allocated memory and improve network performance by maintaining only re- quired bridges and flows. Scripts related to virtual machines and OpenFlows will change depending on hypervisor and SDN controller and thus, those are not included in this paper. C. Xen hypervisor and Rump kernels In order to manage the status of virtual machines, hypervisor is a useful tool providing a variety of APIs. Xen[5] is one of the popular open source hypervisors for virtual machines and compatible with most operat- ing systems. However, it requires much computing re- sources to run general virtual machines. To simulate the environment where many virtual machines are running on a host, Rump Kernel[2] which is uniker- nel virtual machine with the NetBSD kernel is used. Although the unikernel is similar to containers like docker, it includes its own kernel like regular oper- ating systems which makes the host secure from ker- nel attack. Unikernel usually consists of an applica- tion and required frameworks and thus, needs a small amount of cpu and memory. In the project, the status of rumpkernel is controlled by rumprun tool in Open- VPN script. D. Open vSwitch and Floodlight SDN controller Open vSwitch[9] is a virtual switch providing bridged network for virtual machines. Static Flow Pusher which is one of applications of Floodlight helps to manage flows. It provides REST API with json type request and response which makes it easy to handle data. Since there is only a tap device on the server side, we cannot trust any information in packets except source IP address and TCP port thanks to SSL tunnel- ing. First, we need 2 rules to drop every IP and ARP packets by default. And, 4 rules per user are required to be added to allow and route packets in both direc- tions. The rules protect the server from attacks ma- nipulating packets from both of VPN client and guest OS. FIG. 5. An example that two users connected to a server In the figure 6, user 1’s packets should be passed to br-user1 bridge and user 2’s packets should go to br-user2. To accomplish it, next OpenFlow rules are required be added to br0. • Default drop rules – priority: 1 – match * protocol: IP, ARP
  • 5. 5 – action * drop • Flow for packets from user1 – priority: 10 – match * in port: 5 * source MAC: 00:00:00:00:00:01 * protocol: IP, ARP – Action * output: port 6 • Flow for packets to user1 – priority: 10 – match * in port: 6 * destination MAC: 00:00:00:00:00:01 * protocol: IP, ARP – Action * output: port 5 • Flow for packets from user2 – priority: 10 – match * in port: 5 * source MAC: 00:00:00:00:00:02 * protocol: IP, ARP – Action * output: port 7 • Flow for packets to user2 – priority: 10 – match * in port: 7 * destination MAC: 00:00:00:00:00:02 * protocol: IP, ARP – Action * output: port 5 These rules help to drop unnecessary and malicious packets and for users to securely access their net- work. user_id username password mac_addr ip_addr 1 user1 ***** 00::01 10.0.0.10 2 user2 ***** 00::02 10.0.0.20 TABLE I. An example of users table E. Database MySQL server is required for storing user data and authentication. First, user table is created at first and a user is registered by inserting data into table. The structure of the table looks like table I although it is simplified. Username and password are necessary to authen- ticate users. MAC address should be updated when a user connects, disconnects, or change it. By do- ing so, the server can prevent from impersonating other users. Actually, IP address is not required be- cause users can change it without being noticed by the server if it is bridged mode. However, IP spoof- ing attack is useless because of flow rules in network layer 2. F. Sharing networks between users Although users can share networks in client side, there are advantages in connecting bridges in the server. Networks can be simply linked by making a connection between bridges by patch ports, VXLAN, or GRE tunnel. First, it is secure because users don’t have to expose address of their host running client to others. And server can force to disconnect bridges whenever the owner wants. In addition, it is beneficial for network performance between virtual machines because they can communicate without passing VPN tunnel. VI. SECURITY Basically, private networks must be secure from out- side as well as between users thanks to SSL tunnel- ing based on certificates and OpenFlow rules. The packet switching occurs in layer 2 network and each virtual machines are connected to bridge through tap devices. This makes it difficult to modify packets in guest OS for the malicious purpose. On tap of that, the entire network topology can be only seen and con- trolled by host OS.
  • 6. 6 A. MAC address spoofing Algorithm 1 Learn-address script if operation = add or update then if address already exists in user DB then return failure else Update the user’s address end if else if operation = delete then Change the user’s address to null end if return success Flow rules are based on source and destination MAC address and thus, attackers may try to spoof MAC address to access other user’s network. How- ever, if a user change the address of tap device, Open- VPN detects the change and rejects the packets if the address is already assigned to other user. To be spe- cific, the learn-address script of OpenVPN server is triggered when a client connects or changes MAC ad- dress and it can refuse the connection by returning failure code. OpenVPN passes the operation, address, and user ID to the script as parameters. By using this, if a new MAC address of a user overlaps with one of other users connected, the server rejects the later one. B. Packet Crafting On the guest OS, an attacker may try to manipulate MAC address of packets and send them to other net- work. However, the packets cannot pass the patch port on the central bridge according to OpenFlow rules. On top of that, users cannot access the network devices on host OS. Of course, some hypervisors had vulnerabilities escalating privileges from guest to host OS like VENOM[3] before. It is already patched in most of virtualizations and also it is beyond the scope of this paper. VII. DRAWBACKS In the project, we anticipated that users want to stop their virtual machines after VPN connection is closed. However, some of the users may like to keep running for scheduled jobs. Instead of stoping or suspending the virtual hosts, minimizing hardware resource would be better if the hypervisor supports changing the virtual hardware of running guest OS. And it will be restored to normal status when the user comes back like sleep mode in laptop PC. VIII. APPLICATION A. Virtual Private Cloud Even if the objective would be little different, one of the real world problems related to the project is Vir- tual Private Cloud(VPC)[4]. It creates and deploy vir- tual machines on isolated network from other users. And users can control the accessibility through NAT or connect two networks through VPN tunnel. Although some companies like Amazon support IPsec hardware VPN for high security, it costs much as the number of users increases. For small companies which cannot afford VPN hardware, this approach would help them to provide VPC services with limited resources. B. Web service FIG. 6. Deployment of web service using reverse proxy Virtual machines in private network are hidden from outside by default. To deploy web services, re- verse proxy server is needed to run on VPN client host. Most of the web server applications, such as Apache and Nginx Web server, support reverse proxy that distributes traffic to internal virtual machines de- pending on IP address, domain name, or URL. Al- though the internal network is rather fast, overall network performance would decrease because every packet from hosts in the external network should be passed through VPN tunnel. IX. FUTURE WORKS Although it is a prototype and not scalable much, it will be able be applied to the larger system after combining with the cloud platform. It only requires slight modification in the system. A. Cloud Architecture Although the implementation of this project is lim- ited to build a virtual network in a host, it can be ex- pandable to the cloud system because it is designed
  • 7. 7 in consideration of flexibility and scalability. In the larger virtualized environment, two servers storing user data and virtual machine images should be sepa- rated. The figure 7 displays an example. FIG. 7. The overall structure for cloud management system For load balancing, multiple VPN servers will be necessary. OpenVPN supports simple load balancing by adding servers in configuration file. After authen- tication, the management server will find idle hosts to run virtual machines. Then, the server will create a bridge and start virtual machines on the host. Finally, users can access guest OS by connecting two bridges in VPN and hyperviser servers with tunnel and adding flows to allow packets. X. CONCLUSION Through the project, various methods to serve vir- tual machines with limited resources are investigated. In conclusion, VPN with OpenFlow is one of the best systems when it comes to security and scalability al- though routing packets by source IP with central au- thentication server would be better in network per- formance. In addition, it is showed that the system is scalable enough to be applied to the virtual private cloud system in the future. With the advent of uniker- nels and Microservices, this system will be helpful to save resources in virtulization on private networks. [1] Project floodlight. http://www.projectfloodlight. org/. [2] Rump kernels. http://rumpkernel.org/. [3] Venom. http://venom.crowdstrike.com/. [4] Virtual private cloud. https://aws.amazon.com/vpc/. [5] Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. Xen and the art of virtualization. ACM SIGOPS Operating Systems Review, 37(5):164– 177, 2003. [6] Alan DeKok. Freeradius, 2008. [7] Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru Parulkar, Larry Peterson, Jennifer Rexford, Scott Shenker, and Jonathan Turner. Openflow: enabling in- novation in campus networks. ACM SIGCOMM Com- puter Communication Review, 38(2):69–74, 2008. [8] Steven P Miller, B Clifford Neuman, Jeffrey I Schiller, and Jermoe H Saltzer. Kerberos authentication and au- thorization system. In In Project Athena Technical Plan. Citeseer, 1988. [9] Ben Pfaff and Bruce Davie. The open vswitch database management protocol. 2013. [10] James Yonan. Openvpn, 2007. [11] Gang Zhao, Dong Zheng, and Kefei Chen. Design of single sign-on. In E-Commerce Technology for Dynamic E-Business, 2004. IEEE International Conference on, pages 253–256. IEEE, 2004.