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