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 --- kpov_judge/tasks/nat_vlc/howtos/en/index.html | 72 ----------------------- kpov_judge/tasks/nat_vlc/howtos/images/1.jpg | Bin 35092 -> 0 bytes kpov_judge/tasks/nat_vlc/howtos/images/2.jpg | Bin 40962 -> 0 bytes kpov_judge/tasks/nat_vlc/howtos/si/index.html | 80 -------------------------- 4 files changed, 152 deletions(-) delete mode 100644 kpov_judge/tasks/nat_vlc/howtos/en/index.html delete mode 100644 kpov_judge/tasks/nat_vlc/howtos/images/1.jpg delete mode 100644 kpov_judge/tasks/nat_vlc/howtos/images/2.jpg delete mode 100644 kpov_judge/tasks/nat_vlc/howtos/si/index.html (limited to 'kpov_judge/tasks/nat_vlc/howtos') diff --git a/kpov_judge/tasks/nat_vlc/howtos/en/index.html b/kpov_judge/tasks/nat_vlc/howtos/en/index.html deleted file mode 100644 index 6048647..0000000 --- a/kpov_judge/tasks/nat_vlc/howtos/en/index.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - -

NAT VLC:

-

Explanation:


- Set up a computer so that it forwards all packets meant for a certain address, to another computer.

-

Instructions:

-

1. Create two VMs. SimpleArbiter using the disk simpleArbiter and NATServer.

- 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. -
-

2. NATServer should have two network interfaces, one should connect to the simpleArbiter VM and the other to the internet.

- Adapter 1 should be NAT and adapter 2 should be Internal Network.
- Simple Arbiter must be connected to the Internal Network. -
- slika-1 -

3.On NATServer use ifconfig or /etc/network/interfaces to configure the network interfaces you created in virtualbox.

- - -vim /etc/network/interfaces
- -Set it up like this:
- 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. Configure SimpleArbiter so that it uses NATServer as the default gateway.

- -

5. Set up DNS (etc/resolv.conf) on NATServer.

- 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
- Than we set up the host:
- vim /etc/hosts
- Replace the first line with:
- 127.0.0.1 nat localhost.localdomain localhost
- -

6. Enable IP forwarding on NATServerju (should be run as root).

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

7. Set up NAT on NATServer using iptables.

- - 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. Use vlc on simpleArbiter to watch the video over your network.


- - -

8. Additional resources


--https://www.howtoforge.com/nat_iptables
--http://www.bctes.com/nat-linux-iptables.html
- - - - - - - - diff --git a/kpov_judge/tasks/nat_vlc/howtos/images/1.jpg b/kpov_judge/tasks/nat_vlc/howtos/images/1.jpg deleted file mode 100644 index adee258..0000000 Binary files a/kpov_judge/tasks/nat_vlc/howtos/images/1.jpg and /dev/null differ diff --git a/kpov_judge/tasks/nat_vlc/howtos/images/2.jpg b/kpov_judge/tasks/nat_vlc/howtos/images/2.jpg deleted file mode 100644 index f7868df..0000000 Binary files a/kpov_judge/tasks/nat_vlc/howtos/images/2.jpg and /dev/null differ diff --git a/kpov_judge/tasks/nat_vlc/howtos/si/index.html b/kpov_judge/tasks/nat_vlc/howtos/si/index.html deleted file mode 100644 index 779cd54..0000000 --- a/kpov_judge/tasks/nat_vlc/howtos/si/index.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - -

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