Difference between revisions of "Courses/Computer Science/CPSC 526.W2015/Tutorial Schedule"

From wiki.ucalgary.ca
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 51: Line 51:
  
 
= Week 11: Mar. 30 =
 
= Week 11: Mar. 30 =
* Session 1 – Bro (Guest Speaker!)
+
* Session 1 – Bro (Guest Speaker!)   Slides: [[Media:Network_Monitoring_Bro.pdf]]   
 
** https://www.bro.org/research/
 
** https://www.bro.org/research/
 
* Session 2 – Interesting captured packets presentations (worth 25 points)
 
* Session 2 – Interesting captured packets presentations (worth 25 points)
  
= Week 12: Apr. 6 =
+
= Week 12: Apr. 6 - Cancelled =
 
* Session 1 – VPN (worth 25 points, details TBD)
 
* Session 1 – VPN (worth 25 points, details TBD)
 
* Session 2 – VPN (Cont’d)
 
* Session 2 – VPN (Cont’d)
Line 79: Line 79:
  
 
* Crypto programming using NACL http://nacl.cr.yp.to/  (see also http://doc.libsodium.org/ )
 
* Crypto programming using NACL http://nacl.cr.yp.to/  (see also http://doc.libsodium.org/ )
 +
 +
* VPN: The University of Calgary provides a VPN server, and you can find documentation explaining how to connect to it using Fortinet at https://www.ucalgary.ca/it/services/virtual-private-network. Look under "Instructions for Connecting to General VPN". One thing to note is that you need to connect to the server on port 10443, the images in the documentation show this, but the text doesn't mention it. Thanks to Taylor for the heads up on the university's VPN and the missing port number. You can download the Fortinet VPN client through the University's software distribution website (https://iac01.ucalgary.ca/SDSWeb/). OpenVPN (https://openvpn.net/) also has a lot of useful documentation for setting up your own VPN server and provides clients for mobile devices.
  
 
= Using TUN/TAP =
 
= Using TUN/TAP =

Latest revision as of 19:02, 2 April 2015

T01  TR  ST057   17:00  Bradley Rougeau   
T02  WF  ST061   15:00  Benedict Chukuka  
T03  MW  EDC152  12:00  Benedict Chukuka 

  • Bring your computers to class for hands-on activity. This especially begins from the second tutorial.

Below are tutorial topics that we will be discussing each week.Tutorials begin on January 19, 2015. (All dates on this website are tentative and subject to change)

Week 1: Jan. 19

Week 2: Jan. 26

Week 3: Feb. 2

  • Session 1 – Building a network from scratch (do it yourself)
  • Session 2 – Network programming in C & Java. Slides: Media:Wk3.Session2.pdf

Here are the promised UDP Echo Client and Echo Server files

Week 4: Feb. 9

Week 5: Feb. 16

  • No sessions (Reading Week)

Week 6 Feb. 23

Week 7: Mar. 2

Week 8: Mar. 9

Week 9: Mar. 16

  • Session 1 – Google Gruyere Cont’d. Slides: Media:Wk9.Session1.pdf
  • Session 2 – Write and send encrypted email (worth 25 points)

Week 10: Mar. 23

Week 11: Mar. 30

Week 12: Apr. 6 - Cancelled

  • Session 1 – VPN (worth 25 points, details TBD)
  • Session 2 – VPN (Cont’d)


Useful Links

  • Installing nmap: (1.) sudo apt-get update (2.) sudo apt-get install nmap (3.) Run nmap to see that it is now installed with all the available features listed
  • VPN: The University of Calgary provides a VPN server, and you can find documentation explaining how to connect to it using Fortinet at https://www.ucalgary.ca/it/services/virtual-private-network. Look under "Instructions for Connecting to General VPN". One thing to note is that you need to connect to the server on port 10443, the images in the documentation show this, but the text doesn't mention it. Thanks to Taylor for the heads up on the university's VPN and the missing port number. You can download the Fortinet VPN client through the University's software distribution website (https://iac01.ucalgary.ca/SDSWeb/). OpenVPN (https://openvpn.net/) also has a lot of useful documentation for setting up your own VPN server and provides clients for mobile devices.

Using TUN/TAP

TUN/TAP is a kernel extension that allows you to create virtual interfaces. TUN gives you a layer 3 interface, while TAP gives you a layer 2 interface. These can be useful for working on the Scapy scripts for HW1, as it allows you to set up as many interfaces as you want on a single machine and have them talk to each other. Unfortunately it doesn't look like there will be time for us to cover this in class, however I've written a quick and (hopefully) easy to read and use C program that allows you to set up and take down TUN/TAP interfaces without really needing to understand them. You can also use the tunctl utility in the uml-utilities package, but I had some issues with it and I'm not sure if it exists for all Linux distros.

The program I've written is here: Media:Tuntap.c

Steps for running it to create a TUN/TAP interface:

  • Type "sudo su" to give yourself root access for all of the following steps
  • Create the tun device node in the /dev/net directory:
    • mkdir /dev/net (if it doesn't exist already)
    • mknod /dev/net/tun c 10 200
  • Compile and run the C program
    • When you run it, you need to give options to indicate if you want to create or delete the interface, the interface name, and if you want to create a tun or tap interface. Run the program without options for details (or look at the source),
    • Easy Mode: To create TUN interface, type "gcc -o tuntap tuntap.c && ./tuntap create tun0 TUN" in whatever directory you download the C code to.
  • Bring the interface up and assign it an IP address.
    • Easy Mode: To bring up TUN interface, type "ifconfig tun0 <some IP address> up"

If you now type "ifconfig" you should see the tun0 interface at whatever IP address you assigned it. You can ping that address and do whatever you'd do with a normal interface. If you'd like to read more about TUN/TAP this page gives a pretty solid explanation (I also took a lot of my code from there): https://www.kernel.org/doc/Documentation/networking/tuntap.txt.