Sie sind auf Seite 1von 4

IPSec  lab 

ITK 351 Spring 2011 Assignment 8 

VMWare Setup 
1. Connect to ISU with the VPN (Cisco VPN or http://webvpn.ilstu.edu)  
2. Open Internet Explorer 8 with “Run as Administrator” or Firefox 3  
3. Using that browser, go to lab manager at http://10.21.50.20/LabManager/ 
4. Enter your ULID and Lab Password you’ll find under My Grades in Blackboard. 
5. Go to Library (left hand side) 
6. Click on the Assignment 8 configuration and “Clone to Workspace” 
a. Name it <Your ULID>’s Assignment 3 
b. Storage Lease should expire in 14 days 
c. Leave the rest as default 
7. It could take a few minutes to complete 
8. Once that is finished go to the workspace 
9. Click on the configuration that was just cloned, and click on Deploy… 
a. Change the Deployment Lease to 14 days 
b. Leave the rest as default 
10. It may take a while to deploy 
11. Once they are deployed, click on them and view the console 
a. At this point you may have to install a plug‐in.  If so, install it by clicking on the link, 
restart your browser, re‐login and go to the workspace. 
12. Click on the configuration name and choose Show Consoles 
13. You should now be able to interact with the VMs 
a. If you can’t get it to work in Firefox, like I wasn’t, use IE 
b. If you have any other problems, let me know 
14. All of the passwords are “password” without the quotes 
15. Use your operating system’s screen capture utility to capture the images.  Pare them down to 
just the VM screen (in Win 7, the snipping tool is useful for this) 
 
IPSec lab 

1. You’ve been given an Ubuntu 10.04 system and a Windows 7 system.  In this lab we will set up 
the Ubuntu system as an IPSec VPN server.  The Ubuntu system has two network interfaces.  
One, 192.168.1.5 is the one connected to the network.  The second, 192.168.100.1, is not 
connected to any network, but it will represent another network we are connecting to.  The 
Windows 7 system will be setup to connect to the IPSec VPN server.  Its network interface has 
been assigned 192.168.1.6 
2. I’ve created two certificates and signed them using the course CA 
a. 192.168.1.5 for the Ubuntu system (5.p12) 
b. 192.168.1.6 for the Window 7 system (6.p12) 
c. I’ve packaged the certificates and private keys for both in PKCS#12 files.   
d. I’ve also included the course CA in PEM format (cacert.pem) 
e. You can find these at http://www.itk.ilstu.edu/faculty/dtwitch/351/ 
3. OpenSSL is available on the Ubuntu system to make certificate conversions 
a. The PKCS#12 files have no password 
4. Copy the CA’s certificate in PEM format to /etc/ipsec.d/cacerts 
5. Copy the 192.168.1.5 certificate in PEM format to /etc/ipsec.d/certs 
6. Copy the 192.168.1.5 private key in PEM format to /etc/ipsec.d/private 
7. Open a terminal (Applications Æ Accessories Æ Terminal) and use nano as the super user to 
edit /etc/ipsec.secrets, the StrongSwan configuration file 
a. sudo nano /etc/ipsec.secrets 
b. add the following line (there is no space before the colon) 
c. : RSA <the name of the file you copied to
/etc/ipsec.d/private> 
8. Open a terminal (Applications Æ Accessories Æ Terminal) and use nano as the super user to 
edit /etc/ipsec.conf, the StrongSwan configuration file 
a. sudo nano /etc/ipsec.conf 
9. Follow the instructions at 
http://wiki.strongswan.org/projects/strongswan/wiki/Win7SingleConfig to configure 
StrongSwan to accept the Windows 7 client.   
a. The leftsubnet should be 192.168.100.0/24 
b. The rightsourceip should  be 192.168.100.5 
c. The rightid should be the distinguished (or full) name of the Window 7 client certificate  
i. “C=US, ST=Illinois, L=Normal, O=Illinois State University, OU=ITK 351 Spring 
2011 A6, CN=192.168.1.6” 
10. When finished with the configuration, restart the ipsec IKE daemons 
a. sudo /etc/init.d/ipsec restart 
11. Using the steps at http://wiki.strongswan.org/projects/strongswan/wiki/Win7Certs import the 
certificate in 6.p12 into the the local computer’s personal certificate store  
a. the CA’s certificate has already been imported into the local computer’s trusted root 
certificate store 
b. You can delete the certificate that was issued to me 
12. Follow the steps at http://wiki.strongswan.org/projects/strongswan/wiki/Win7Config to create 
a VPN configuration 
13. On the Ubuntu machine, follow the IPSec logs by issuing the following command in a terminal 
a. tail –f /var/logs/syslog 
b. The ipsec logs are prefixed with charon 
14. Start Wireshark on the Windows 7 machine 
15. Follow the instructions at http://wiki.strongswan.org/projects/strongswan/wiki/Win7Connect 
to start the VPN. 
16. In Ubuntu, start Wireshark 
a. Terminal Æ “sudo wireshark” 
b. Choose the “any” interface 
17. From the Windows 7 machine, ping 192.168.100.1 (the other network interface on the Ubuntu 
machine) 
a. If you don’t get a reesponse you m might have too make sure tthe other inteerface is up.  TTo do 
this cliick on the dou
uble arrows in the upper rright of the Ubuntu interfaace and click o on 
the eth h4 interface.  It should con
nnect. 

 
18. Yo
ou’ll know if yyou were succcessful if in w
wireshark youu see ISAKMP packets follo
owed  by ESP 
packets as shoown below 

 
 
Thhe ESP packet is followed by an ICMP p ping packet beecause wiresh hark is seeingg the ESP packet 
coome in from tthe VPN where it is decryp pted and sentt to the 192.1168.100.5 inteerface in the clear.  
If you listen on
n the wire bettween 192.16 68.1.5 and 1992.168.1.6 you u’ll see only EESP packets.  Note 
thhat ESP packeets hide the protocol of the
e packet. 
 
19.  In
n the log you’ll see someth
hing like this 

Th
he circled porrtion is the crreation  of the
e security asssociation. 
20. Tu
urn in the following screen nshots: 
a. From w wireshark sho owing the ISAAKMP negotiaation and ESP packets 
b. From ssyslog showin ng the creatio on of the SA 

Das könnte Ihnen auch gefallen