Академический Документы
Профессиональный Документы
Культура Документы
Overview of the steps required to establish a totally virtualised LAN inside Virtual Box:
(1) Install VirtualBox on your real machine (host)
(2) Mount the OpenVPN Server image into VirtualBox and boot up the Virtual Machine.
(3) For each client Ubuntu image, mount the Ubuntu Desktop image and boot up the Virtual
Machine, log in to the OpenVPN server and download a client configuration, launch OpenVPN
Client using the client configuration file youve downloaded.
Detailed Steps:
(1) Installing VirtualBox:
(a) Download VirtualBox 4.0.4 from this URL http://www.blueicon.com/uploads/VirtualBox4.0.4-70112-Win.exe
(b) Start the installation by opening your downloaded .exe file, then you will see the screenshot
below.
(d) Leave everything at its default, and click Next, then you will see this
(e) The above 2 options is up to you, click Next, then you will see this warning saying that you
will get a disconnection from the Internet and LAN during installation.
(g) Click on Install to start the installation, during installation, you will get a series of these
warnings, click on Continue Anyway for all of them.
(h) This is the last step of installation, you will see this
(i) Leave the checkbox ticked, and click on Finish, then VirtualBox will automatically launched.
(2) Mount the OpenVPN server image and boot up the Virtual Machine:
(a) Download
the
OpenVPN
Server
image
from
this
URL
http://www.blueicon.com/uploads/OpenVPNServer.vdi
,
the
file
name
is
OpenVPNServer.vdi
(b) Launch VirtualBox and you will see the main interface of Virtual Box
(e) Give a name/description for your Virtual Machine, e.g. OpenVPNServer, Choose Linux for
the Operating System, and choose Ubuntu for Version, then Click Next
(g) Tick the check box Boot Hard Disk, choose Use existing hard disk, and click on the
browse button to locate your downloaded OpenVPNServer .vdi image file , then click Next
(i) Highlight the OpenVPNServer Virtual Machine on the left, and click on Settings
(j) Below are the settings required for the OpenVPNServer, these settings are a must,
otherwise you might have to reconfigure the server. Click on the Network tab on the left,
for Adapter 1, check enable network adapter, choose Host-Only Adapter for Attached
To, choose VirtualBox Host-Only Ethernet Adapter for the Name, LEAVE THE ADAPTER
TYPE AS DEFAULT, VirtualBox will default to the one which suits your hardware. Type in
080027EC4768 for the MAC Address, this setting is most important in order for the server to
run at startup. Check the tickbox for Cable Connected
For Adapter 2, check enable network adapter, choose NAT for Attached To, LEAVE THE
ADAPTER TYPE AS DEFAULT, VirtualBox will default to the one which suits your hardware.
Type in 080027C83172 for the MAC Address, this setting is most important in order for the
server to run at startup. Uncheck the tickbox for Cable Connected. Then click on OK.
(l) After the machine got booted up, we need to check whether the OpenVPN server is running
properly, and also we might need to change one setting in the Admin panel. Click on the
Firefox browser icon on the top bar.
(n) The URL of this bookmark is https://localhost:943/admin/ , if the OpenVPN server is running
correctly, you should see this Administration panel login. If you see something like cannot
connect, then one of your previous settings is not correct.
(o) Type in openvpn as username, blueicon as password. We only need to check if one
setting is correct, which is the local IP address has to be the same as the IP address which
the clients connect to. When you logged in, check that the OpenVPN server has started by
clicking Status Overview on the left panel. Now click on Server Network Settings on the
left panel, the IP address in the text field must be the same as the one shown below it, if its
not, then you need to change it to the IP address under the text field box, and click on Save
Settings at the bottom of the page if you need to change it.
(p) If you have made a change to that IP, you must do the following:
(q) Once you clicked that, it should say Running Server Updated, like in this screenshot
(3) Mount an image for one of the nodes and make a connection to the VPN server as a VPN client
(a) Download Ubuntu NodeA.vdi from this URL (
http://www.blueicon.com/uploads/Ubuntu NodeA.vdi )
(b) Click on New to add another image hard disk
(d) Type a name/title for your Virtual Machine, e.g. Ubuntu NodeA , choose Linux for the
Operating System, and Ubuntu as the Version, then click Next
(f) Check Boot Hard Disk, choose Use existing hard disk, click the browse button to locate
your downloaded .vdi image file, then click Next
(i) Click on Network on the left panel, we only need one Adapter here. Check Enable
Network Adapter, choose Host-only Adapter for Attached to, choose VirtualBox HostOnly Ethernet Adapter for Name, leave the Adapter Type as default, no need change the
MAC address randomly generated by VirtualBox, make sure the Cable Connected is
checked. Click OK
(k) We are now up to the step to connect this virtual machine as a VPN client to the OpenVPN
Server. Click on the Firefox icon on the top to open the Firefox browser.
(n) Uncheck Permanently store this exception, then click on Confirm Security Exception
(o) I have created 10 users in the OpenVPN server, usernames are node1, node2 .. etc, and
the password are all the same, which is blueicon. Type in node1 as the username, and
blueicon as the password. Choose Login, and click Go.
(q) Scroll down to the bottom, and download the VPN client configuration file by left clicking
Yourself (user-locked profile)
(r) When the download pop-up box comes up, Choose Save File, then click OK
(s) We are now ready to connect to the OpenVPN server by using the downloaded
configuration file. Open a terminal window by clicking Accessories, then Terminal.
(t) Connect to the OpenVPN server by typing this command: sudo openvpn -config
/home/blueicon/Downloads/client.ovpn
(u) The you will be prompted to type the Administrator password, the password is blueicon.
(v) Then you will be prompted for a username and password for logging into the OpenVPN
server, type node1 as username, and blueicon as password.
(w) If you see this message Initialization Sequence Completed, that means you have
successfully connected to the OpenVPN Server as a VPN client.
(x) Repeat all these steps for adding another VPN client to your VLAN, except for the step when
you go to download the client configuration file, log in as node2, same password. The URL
to download VPN Client B is here (http://www.blueicon.com/uploads/Ubuntu NodeB.vdi).
Appendix
(b) You will then prompted to type in the Administrator password, which is
blueicon
(c) This is the GUI for the firewall configuration, which can be downloaded
from issuing this command in the terminal: sudo apt-get install gufw