diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-24 21:05:27 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-24 21:05:27 +0100 |
commit | 8081a5520a441b43a8a7a73f3a90c7aacfaa8e10 (patch) | |
tree | c7f49bd33ed19d53afc0ee9df8b2c82c200c5910 /tasks/openvpn_simple_smb/howtos | |
parent | 9963b74f777edf985540eac71b1ca095f88b8bca (diff) |
Move everything one level up
Diffstat (limited to 'tasks/openvpn_simple_smb/howtos')
-rw-r--r-- | tasks/openvpn_simple_smb/howtos/en/index.html | 98 | ||||
-rw-r--r-- | tasks/openvpn_simple_smb/howtos/si/index.html | 95 |
2 files changed, 193 insertions, 0 deletions
diff --git a/tasks/openvpn_simple_smb/howtos/en/index.html b/tasks/openvpn_simple_smb/howtos/en/index.html new file mode 100644 index 0000000..aba834e --- /dev/null +++ b/tasks/openvpn_simple_smb/howtos/en/index.html @@ -0,0 +1,98 @@ +<html>
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=utf-8">
+</head>
+
+<body><font face="Georgia, Times New Roman, Times, serif">
+<strong><h1>OpenVPN and SMB task:</h1></strong>
+<p><strong><h2>Quick task:</h2></strong><br>
+ Connect to VPN with OpenVPN. Enable access to files through NFS and copy them through SMB.</p>
+<p><strong><h2>Instructions:</h2></strong><br>
+ 1. From Directory with images of virtual computers drag twice the picture SimpleArbiterVPN and VPNClient.<br>
+ 2. With VirtualBox (or other programs for virtual computers) create two virtual computers and give them VPNCLient.vdi and SimpleArbiterVPN.vdi as disk for storage.<br>
+ 3. On both set two network interface(NAT and Internal) and run them.<br>
+ 4. On both VM login with username <strong>root</strong> and password <strong>kaboom</strong> .</p>
+<p><h3><u><strong><em>First part: Set up OpenVPN on SimpleArbiterVPN and VPNClient.</em></strong></u></h3>
+<p><h4><u><strong><em>Settings on the server:</em></strong></u></h4>
+ 1. Download packages <strong>uml-utilities</strong> -> to adjust the virtual network interfaces and packet (<strong>openvpn</strong>). example: sudo apt-get install openvpn<br>
+ 2. The new virtual network interface create with <strong>tunctl</strong> and specify IP with <strong>sudo ifconfig tap0 10.P.Q.R netmask 255.255.255.0</strong><br>
+ 3. Then generirate common key (you will share that key with client) with the command: <strong>openvpn --genkey --secret vpnkljuc.key</strong><br>
+ 4. On server set the configuration file tap0.conf, which should contain (split by lines) "dev tap0","proto tcp-server", "secret vpnkljuc.key"<br>
+ 5. Run openvpn with <strong>openvpn --config /some_directory/somewhere/tap0.conf</strong><br/>
+<p><h4><u><strong><em>Settings on the client:</em></strong></u></h4>
+1., 2. steps are the same as the settings on the server<br>
+3. Create configuration file tap0.conf, which should contain (split by lines) "remote IP_OF_YOUR_VPN_SERVR", "dev tap0", "proto tcp-client", "secret vpnkljuc.key"<br>
+4. On OpenVPN server connect to <strong>openvpn --config /some_directory/somewhere/tap0.conf</strong><br/>
+<p>
+
+ <u><strong><em><h3>Second part: Access to imenika /home/test/IME_IMENIKA over NFS</h3></em></strong></u>
+<p><h4><u><strong><em>Client settings:</em></strong></u></h4>
+ 1. Using "sudo apt-get install nfs-kernel-server" we install nfs service<br>
+ 2. Create a directory /home/test/IME_IMENIKA<br/>
+ 3. To /etc/exports add line /home/test/bla IP_client
+ 4. Use sudo exportfs -a to save
+ 5. Restart service using "sudo service nfs-kernel-server start"
+<p><h4><u><strong><em>Client settings:</em></strong></u></h4>
+ 1. Instal client for nfs with command "sudo apt-get install nfs-common"<br/>
+ 2. Create mounting directory "sudo mkdir -p /mnt/nfs/home/test" and mount servers file "sudo mount IP_SERVER:/home/test"<br/>
+ 3. For automatic mounting we add previous commands to /etc/fstab <br/>
+
+<p><h3><u><strong><em>How-to za uporabo kpov-judge za OpenVPN</em></strong></u></h3>
+
+ </font>
+
+<hr>
+<p>
+howto: task_check(results, params):
+ Metoda dobi, kot prvi argument rezultat metode task(...), kot drugi pa
+ rezultat funkcije gen_params().
+
+ Vrne stevilo pridobljenih tock.
+
+
+howto: task(...):
+ Metoda prejme naslednje argumente:
+ - IP naslov VPN streznika
+ - DNS naslov VPN streznika
+ - IP naslov klienta 1
+ - DNS naslov klienta 1
+ - IP naslov klienta 2
+ - DNS naslov klienta 2
+
+ Vrne slovar rezultatov:
+
+ results['SimpleArbiter_is_VPN_set_up']
+ pove ali je VPN streznik nastavljen
+
+ results['SimpleArbiter_is_VPN_running']
+ pove ali je VPN streznik zagnan
+
+ results['SimpleArbiter_ping_C1']
+ ping rezultati (streznik -> klient1)
+
+ results['SimpleArbiter_ping_C2']
+ ping rezultati (streznik -> klient2)
+
+ results['SimpleArbiter_nmap_results']
+ pove ali sta oba klienta povezana na pravi VPN streznik
+
+ results['SimpleArbiter_dir_vpn_contents']
+ kljuc, ce se ta nahaja v ustreznem imeniku
+
+ results['SimpleArbiter_nfs_access_control_list']
+ preveri ce NFS dovoljuje dostop do /home/test/IME_UPORABNIKA
+
+ results['VPNClient1_ping_VPN_server']
+ ping rezultati (klient 1 -> strežnik)
+
+ results['VPNClient2_ping_VPN_server']
+ ping rezultati (klient 2 -> strežnik)
+
+</p>
+
+</body>
+
+</html>
+
+</html>
diff --git a/tasks/openvpn_simple_smb/howtos/si/index.html b/tasks/openvpn_simple_smb/howtos/si/index.html new file mode 100644 index 0000000..67e1c4e --- /dev/null +++ b/tasks/openvpn_simple_smb/howtos/si/index.html @@ -0,0 +1,95 @@ +<html>
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=utf-8">
+</head>
+
+<body><font face="Georgia, Times New Roman, Times, serif">
+<strong><h1>OpenVPN in SMB vaja: </h1></strong>
+<p><strong><h2>Naloga na hitro: </h2></strong><br>
+ Vzpostavi VPN povezavo z pomočjo OpenVPN. Omogoči dostop do datotek prek NFS in skopiraj datoteke prek SMB.</p>
+<p><strong><h2>Navodila:</h2></strong><br>
+ 1. Iz imenika s slikami virtualnih računalnikov dvakrat povlecite sliki SimpleArbiterVPN ter VPNClient.<br>
+ 2. Z VirtualBoxom (ali ostalim programom za virtualne računalnike) ustvarite dva virtualna računalnika in jim kot disk za shranjevanje podajte VPNCLient.vdi ter SimpleArbiterVPN.vdi.<br>
+ 3. Na obeh nastavite dva omrežna vmesnika (NAT in Internal) in jih zaženite.<br>
+ 4. Na oba VM-a se prijavite z uporabnikom <strong>root</strong> in geslom <strong>kaboom</strong> .</p>
+<p><h3><u><strong><em>Prvi del naloge: Nastavi OpenVPN na SimpleArbiterVPN in VPNClient.</em></strong></u></h3>
+<p><h4><u><strong><em>Nastavitve na strežniku:</em></strong></u></h4>
+ 1. Prenesite pakete <strong>uml-utilities</strong> -> za nastavljanje navideznih omrežnih vmesnikov in paket (<strong>openvpn</strong>). Npr: sudo apt-get install openvpn<br>
+ 2. Nov navidezni omrežni vmesnik kreirate z <strong>tunctl</strong> in mu podate IP z <strong>sudo ifconfig tap0 10.P.Q.R netmask 255.255.255.0</strong><br>
+ 3. Nato generirate skupen ključ(ta ključ boste delili z klientom) z ukazom: <strong>openvpn --genkey --secret vpnkljuc.key</strong><br>
+ 4. Na strežniku še nastavite konfiguracijsko datoteko tap0.conf, ki naj vsebuje (ločeno po vrsticah) "dev tap0","proto tcp-server", "secret vpnkljuc.key"<br>
+ 5. Zaženete openvpn z <strong>openvpn --config /some_directory/somewhere/tap0.conf</strong><br/>
+<p><h4><u><strong><em>Nastavitve na klientu:</em></strong></u></h4>
+1., 2. koraka sta ista kot pri nastavitvah na strežniku<br>
+3. Kreirajte konfiguracijsko datoteko tap0.conf, ki naj vsebuje (ločeno po vrsticah) "remote IP_VAŠEGA_VPN_SERVERJA", "dev tap0", "proto tcp-client", "secret vpnkljuc.key"<br>
+4. Na OpenVPN strežnik se povežete z <strong>openvpn --config /some_directory/somewhere/tap0.conf</strong><br/>
+<p>
+ <u><strong><em><h3>Drugi del naloge: Dostop prek NFS do imenika /home/test/IME_IMENIKA </h3></em></strong></u>
+<p><h4><u><strong><em>Nastavitve na strežniku:</em></strong></u></h4>
+ 1. Z ukazom "sudo apt-get install nfs-kernel-server" namestimo nfs program<br>
+ 2. Uredimo mapo exports "sudo nano /etc/exports" in kreiramo direktorij /home/test/IME_IMENIKA<br/>
+ 3. V datoteko exports dodamo /home/test/bla IP_klienta
+ 4. Share shranimo z sudo exportfs -a
+ 5. NFS strežnik štartamo z "sudo service nfs-kernel-server start"
+<p><h4><u><strong><em>Nastavitve na klientu:</em></strong></u></h4>
+ 1. Z ukazom "sudo apt-get install nfs-common" namestimo programček nfs-common, da lahko kasneje pripnemo share<br/>
+ 2. Na klientu moramo urediti še mount tega direktorija: "sudo mkdir -p /mnt/nfs/home/test" in "sudo mount IP_SERVERJA:/home/test"<br/>
+ 3. Za avtomatski mount ob ponovnem zagonu, dodamo prejšnje ukaze v datoteko /etc/fstab <br/>
+
+<p><h3><u><strong><em>How-to za uporabo kpov-judge za OpenVPN</em></strong></u></h3>
+
+ </font>
+
+<hr>
+<p>
+howto: task_check(results, params):
+ Metoda dobi, kot prvi argument rezultat metode task(...), kot drugi pa
+ rezultat funkcije gen_params().
+
+ Vrne stevilo pridobljenih tock.
+
+
+howto: task(...):
+ Metoda prejme naslednje argumente:
+ - IP naslov VPN streznika
+ - DNS naslov VPN streznika
+ - IP naslov klienta 1
+ - DNS naslov klienta 1
+ - IP naslov klienta 2
+ - DNS naslov klienta 2
+
+ Vrne slovar rezultatov:
+
+ results['SimpleArbiter_is_VPN_set_up']
+ pove ali je VPN streznik nastavljen
+
+ results['SimpleArbiter_is_VPN_running']
+ pove ali je VPN streznik zagnan
+
+ results['SimpleArbiter_ping_C1']
+ ping rezultati (streznik -> klient1)
+
+ results['SimpleArbiter_ping_C2']
+ ping rezultati (streznik -> klient2)
+
+ results['SimpleArbiter_nmap_results']
+ pove ali sta oba klienta povezana na pravi VPN streznik
+
+ results['SimpleArbiter_dir_vpn_contents']
+ kljuc, ce se ta nahaja v ustreznem imeniku
+
+ results['SimpleArbiter_nfs_access_control_list']
+ preveri ce NFS dovoljuje dostop do /home/test/IME_UPORABNIKA
+
+ results['VPNClient1_ping_VPN_server']
+ ping rezultati (klient 1 -> strežnik)
+
+ results['VPNClient2_ping_VPN_server']
+ ping rezultati (klient 2 -> strežnik)
+
+</p>
+
+</body>
+
+</html>
|