From 8081a5520a441b43a8a7a73f3a90c7aacfaa8e10 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 24 Feb 2019 21:05:27 +0100 Subject: Move everything one level up --- tasks/nat_vlc/howtos/si/index.html | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 tasks/nat_vlc/howtos/si/index.html (limited to 'tasks/nat_vlc/howtos/si') 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 @@ + + + + + + + +

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). +
+ slika-1 +

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 +
+slika-2 +

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

+ Nastavi gateway, da ima IP od NATServerja.
+ route add -net IP netmask MASK default gw IP dev eth0
+ +

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

+ vim /etc/resolv.conf + 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.

+ + apt-get install vlc-nox
+ Nastavitev naslova:
+ Open Media > OpenNetwork ....
+ + + +

8. Dodatni viri


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