From e50b373eaa638bce177ca5cf18379acbe9bb826c Mon Sep 17 00:00:00 2001 From: "lv4955@student.uni-lj.si" Date: Sun, 4 Jan 2015 20:44:50 +0000 Subject: git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@141 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/nat_vlc/howtos/si/index.html | 69 +++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 kpov_judge/tasks/nat_vlc/howtos/si/index.html (limited to 'kpov_judge/tasks') diff --git a/kpov_judge/tasks/nat_vlc/howtos/si/index.html b/kpov_judge/tasks/nat_vlc/howtos/si/index.html new file mode 100644 index 0000000..29df436 --- /dev/null +++ b/kpov_judge/tasks/nat_vlc/howtos/si/index.html @@ -0,0 +1,69 @@ + + + + + + + +

NAT VLC:

+

Naloga na hitro:


+ Nastavi računalnik tako, da bo vse pakete za določene naslove prepošiljal na drug računalnik, vzpostavi NAT.

+

Navodila:

+

1. Postavi dva navidezna računalnika. SimpleArbiter z diskom simpleArbiter ter NATServer.

+ Virtualke dobiš na (polz.si/media/uploads/kpov/virtualke). Za NATServer lahko uporabiš base-student-desktop-2014. +
+

2. Postavi NAT server tako, da ima dva omrežna vmesnika. Z enim naj bo povezan na simpleArbiter, z drugim pa na internet.

+ (settings-Network) Adapter 1 nastavimo na NAT (omrežje), adapter 2 pa na InternalNetwork (lokalno).
+ Simple Arbiter nastavimo na InternalNetwork(lokalno). +
+

3.Na NATServer z ukazom ifconfig in z datoteko /etc/network/interfaces skonfiguriraj omrežne vmesnike
+ tako, da bo en povezan v WAN (internet) in en vmesnik na LAN (simpleArbiter).

+ + -vim /etc/network/interfaces
+ -dopišemo:
+ auto eth1
+ iface eth1 inet static
+ NETMASK 255.255.0.0 # Specify based on your requirement
+ IPADDR 192.168.2.1 # Gateway of the LAN
+ NETWORK 192.168.0.0 # Optional
+ ADDRESS 192.168.0.0
+ -ifdown eth1
+ -ifup eth1 +
+

4. SimpleArbiter skofiguriraj tako, da bo privzeti prehod uporabljal NATServer.

+ +

5. Nastavi DNS (etc/resolv.conf) na NATServerju.

+ nameserver 203.145.184.13 # Primary DNS Server provided by the ISP
+ nameserver 202.56.250.5 # Secondary DNS Server provided by the ISP
+ Nato nastavimo še host:
+ vim /etc/hosts
+ Prvo vrstico zamenjamo z:
+ 127.0.0.1 nat localhost.localdomain localhost
+ +

6. Omogoči posredovanje IP naslovov na NATServerju.

+ echo 1 > /proc/sys/net/ipv4/ip_forward + +

7. Nastavi NAT z uporabo paketa iptables na NATServerju.

+ + apt-get install iptables
+ iptables -F
+ ptables -t nat -F
+ iptables -t mangle -F
+ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+ iptables -A FORWARD -i eth1 -j ACCEPT

+ + service iptables restart + +

8. Na simpleArbiter z vlc preberi naslov, na katerem si lahko ogledaš kratek filmček.

+ + +//https://www.howtoforge.com/nat_iptables
+//http://www.bctes.com/nat-linux-iptables.html
+ + + + + + + + -- cgit v1.2.1