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/nat_vlc/howtos | |
parent | 9963b74f777edf985540eac71b1ca095f88b8bca (diff) |
Move everything one level up
Diffstat (limited to 'tasks/nat_vlc/howtos')
-rw-r--r-- | tasks/nat_vlc/howtos/en/index.html | 72 | ||||
-rw-r--r-- | tasks/nat_vlc/howtos/images/1.jpg | bin | 0 -> 35092 bytes | |||
-rw-r--r-- | tasks/nat_vlc/howtos/images/2.jpg | bin | 0 -> 40962 bytes | |||
-rw-r--r-- | tasks/nat_vlc/howtos/si/index.html | 80 |
4 files changed, 152 insertions, 0 deletions
diff --git a/tasks/nat_vlc/howtos/en/index.html b/tasks/nat_vlc/howtos/en/index.html new file mode 100644 index 0000000..6048647 --- /dev/null +++ b/tasks/nat_vlc/howtos/en/index.html @@ -0,0 +1,72 @@ +<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>NAT VLC:</h1></strong>
+<p><strong><h2>Explanation:</h2></strong><br>
+ Set up a computer so that it forwards all packets meant for a certain address, to another computer.</p>
+<p><strong><h2>Instructions:</h2></strong>
+ <h3>1. Create two VMs. SimpleArbiter using the disk simpleArbiter and NATServer. </h3>
+ You can get the disks at polz.si/media/uploads/kpov/virtualke. As for the NATServer VM, you can use any disk you want like base-student-desktop-2014.
+<br>
+ <h3>2. NATServer should have two network interfaces, one should connect to the simpleArbiter VM and the other to the internet.</h3>
+ Adapter 1 should be NAT and adapter 2 should be Internal Network.<br>
+ Simple Arbiter must be connected to the Internal Network.
+<br>
+ <img style="width: 500px; height: 310px;" src="../images/1.jpg" alt="slika-1"></img>
+ <h3>3.On NATServer use ifconfig or /etc/network/interfaces to configure the network interfaces you created in virtualbox.<br></h3>
+
+ -vim /etc/network/interfaces<br>
+ -Set it up like this:<br>
+ auto eth1<br>
+ iface eth1 inet static<br>
+ NETMASK 255.255.0.0 # Specify based on your requirement<br>
+ IPADDR 192.168.2.1 # Gateway of the LAN<br>
+ NETWORK 192.168.0.0 # Optional<br>
+ ADDRESS 192.168.0.0 <br>
+ -ifdown eth1<br>
+ -ifup eth1
+<br>
+<img style="width: 500px; height: 310px;" src="../images/2.jpg" alt="slika-2"></img>
+ <h3>4. Configure SimpleArbiter so that it uses NATServer as the default gateway.</h3>
+
+ <h3> 5. Set up DNS (etc/resolv.conf) on NATServer.</h3>
+ vim /etc/resolv.conf
+ nameserver 203.145.184.13 # Primary DNS Server provided by the ISP<br>
+ nameserver 202.56.250.5 # Secondary DNS Server provided by the ISP<br>
+ Than we set up the host:<br>
+ vim /etc/hosts<br>
+ Replace the first line with:<br>
+ 127.0.0.1 nat localhost.localdomain localhost<br>
+
+ <h3>6. Enable IP forwarding on NATServerju (should be run as root).</h3>
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+
+ <h3>7. Set up NAT on NATServer using iptables.</h3>
+
+ apt-get install iptables<br>
+ iptables -F<br>
+ ptables -t nat -F<br>
+ iptables -t mangle -F <br>
+ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br>
+ iptables -A FORWARD -i eth1 -j ACCEPT<br><br>
+
+ service iptables restart
+
+ <h3>8. Use vlc on simpleArbiter to watch the video over your network. </h3> <br>
+
+
+ <h3>8. Additional resources </h3> <br>
+-https://www.howtoforge.com/nat_iptables<br>
+-http://www.bctes.com/nat-linux-iptables.html<br>
+
+
+
+
+
+</body>
+
+</html>
diff --git a/tasks/nat_vlc/howtos/images/1.jpg b/tasks/nat_vlc/howtos/images/1.jpg Binary files differnew file mode 100644 index 0000000..adee258 --- /dev/null +++ b/tasks/nat_vlc/howtos/images/1.jpg diff --git a/tasks/nat_vlc/howtos/images/2.jpg b/tasks/nat_vlc/howtos/images/2.jpg Binary files differnew file mode 100644 index 0000000..f7868df --- /dev/null +++ b/tasks/nat_vlc/howtos/images/2.jpg diff --git a/tasks/nat_vlc/howtos/si/index.html b/tasks/nat_vlc/howtos/si/index.html new file mode 100644 index 0000000..779cd54 --- /dev/null +++ b/tasks/nat_vlc/howtos/si/index.html @@ -0,0 +1,80 @@ +<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>NAT VLC:</h1></strong>
+<p><strong><h2>Naloga na hitro:</h2></strong><br>
+ Nastavi računalnik tako, da bo vse pakete za določene naslove prepošiljal na drug računalnik, vzpostavi NAT.</p>
+<p><strong><h2>Navodila:</h2></strong>
+ <h3>1. Postavi dva navidezna računalnika. SimpleArbiter z diskom simpleArbiter ter NATServer. </h3>
+ Virtualke dobiš na (polz.si/media/uploads/kpov/virtualke). Za NATServer lahko uporabiš base-student-desktop-2014.
+<br>
+ <h3>2. Postavi NAT server tako, da ima dva omrežna vmesnika. Z enim naj bo povezan na simpleArbiter, z drugim pa na internet.</h3>
+ (settings-Network) Adapter 1 nastavimo na NAT (omrežje), adapter 2 pa na InternalNetwork (lokalno).<br>
+ Simple Arbiter nastavimo na InternalNetwork(lokalno).
+<br>
+ <img style="width: 500px; height: 310px;" src="../images/1.jpg" alt="slika-1"></img>
+ <h3>3.Na NATServer z ukazom ifconfig in z datoteko /etc/network/interfaces skonfiguriraj omrežne vmesnike<br>
+ tako, da bo en povezan v WAN (internet) in en vmesnik na LAN (simpleArbiter).</h3>
+
+ -vim /etc/network/interfaces<br>
+ -dopišemo:<br>
+ auto eth1<br>
+ iface eth1 inet static<br>
+ NETMASK 255.255.0.0 # Specify based on your requirement<br>
+ IPADDR 192.168.2.1 # Gateway of the LAN<br>
+ NETWORK 192.168.0.0 # Optional<br>
+ ADDRESS 192.168.0.0 <br>
+ -ifdown eth1<br>
+ -ifup eth1
+<br>
+<img style="width: 500px; height: 310px;" src="../images/2.jpg" alt="slika-2"></img>
+ <h3>4. SimpleArbiter skofiguriraj tako, da bo privzeti prehod uporabljal NATServer.</h3>
+ Nastavi gateway, da ima IP od NATServerja.<br>
+ route add -net IP netmask MASK default gw IP dev eth0<br>
+
+ <h3> 5. Nastavi DNS (etc/resolv.conf) na NATServerju.</h3>
+ vim /etc/resolv.conf
+ nameserver 203.145.184.13 # Primary DNS Server provided by the ISP<br>
+ nameserver 202.56.250.5 # Secondary DNS Server provided by the ISP<br>
+ Nato nastavimo še host:<br>
+ vim /etc/hosts<br>
+ Prvo vrstico zamenjamo z:<br>
+ 127.0.0.1 nat localhost.localdomain localhost<br>
+
+ <h3>6. Omogoči posredovanje IP naslovov na NATServerju.</h3>
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+
+ <h3>7. Nastavi NAT z uporabo paketa iptables na NATServerju.</h3>
+
+ apt-get install iptables<br>
+ iptables -F<br>
+ ptables -t nat -F<br>
+ iptables -t mangle -F <br>
+ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br>
+ iptables -A FORWARD -i eth1 -j ACCEPT<br><br>
+
+ service iptables restart
+
+ <h3>8. Na simpleArbiter z vlc preberi naslov, na katerem si lahko ogledaš kratek filmček. </h3>
+
+ apt-get install vlc-nox<br>
+ Nastavitev naslova:<br>
+ Open Media > OpenNetwork ....<br>
+
+
+
+ <h3>8. Dodatni viri </h3> <br>
+-https://www.howtoforge.com/nat_iptables<br>
+-http://www.bctes.com/nat-linux-iptables.html<br>
+
+
+
+
+
+</body>
+
+</html>
|