Network setup
This page explains how to set up a network for RuCTFE 2012. Here is step-by-step guide for Ubuntu 12.04.
Assumptions
- Public NIC - eth0;
- Private NIC - eth1;
- Your team network is 10.23.N.0/24, where N is your team number.
Instructions
-
Install Ubuntu 12.04 Server.
-
Configure your network in /etc/network/interfaces.
For example:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 194.226.235.189 # your public ip
netmask 255.255.255.0 # your netmask
gateway 194.226.235.250 # your gateway
auto eth1
iface eth1 inet static
address 10.23.N.1
netmask 255.255.255.0
-
Install OpenVPN.
sudo apt-get install openvpn
-
Unpack OpenVPN config (should be in your POC's mailbox).
tar xzf teamN.tar.gz
-
Copy your private key to teamN directory (which has been extracted from archive), rename it to teamN.key and run
./run-openvpn.sh
-
Now you should have your VPN up and running. Ping 10.23.0.1 to check it.
Note: once OpenVPN connection is established, it can take up to 1 minute before pings will actually fly. If you experience longer delays, feel free to contact us.
-
Enable forwarding.
Uncomment #net.ipv4.ip_forward=1 line in your /etc/sysctl.conf and then run sysctl -p
-
Set up NAT for the networks outside VPN.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Put this line to /etc/rc.local to run it automatically during boot.
-
Set the IP of each team's workstation taking out one from 10.23.N.0/24 pool.
-
Set the 10.23.N.1 as a gateway on each workstation.
-
Set the virtual machines NICs bridged to the NIC of the machine hosting the VM.
If you have any problems with network configuration contact us via mailing list or send an email to network@ructf.org.
Network scheme
