An educational resource providing step-by-step projects to configure a TinyCore VM as a network gateway with DHCP, IP forwarding, and SSH access for advanced network security learning.
Coursework and projects for the WPI class CS 4516: Advanced Computer Networks
This repository is designed for students and instructors involved in advanced computer networks courses to learn practical network security concepts by configuring virtual machines as gateways and DHCP servers. It is ideal for hands-on training in network monitoring, firewall management, and security configuration using lightweight Linux VMs.
This tool relies on VirtualBox VM networking and TinyCore Linux, which uses a RAM-based filesystem requiring explicit backup of configuration files to persist changes. Users should ensure proper port forwarding and network interface configuration in VirtualBox. The scripts and configurations are tailored for educational use and may require adaptation for production environments.
Configure VirtualBox NAT interface to forward host port 12345 to guest port 22
Install Android x86 in a separate VM and configure it to use the TinyCore gateway VM
Install OpenSSH on TinyCore VM: `tce-load -wi openssh`
Copy SSH configuration: `sudo cp /usr/local/etc/ssh/sshd_config.orig /usr/local/etc/ssh/sshd_config`
Set password for user tc: `sudo passwd tc`
Enable SSH to start at boot by appending to /opt/bootlocal.sh
Backup SSH config and shadow file to persist changes
Assign static IP to eth1 interface: `ifconfig eth1 192.168.12.1 netmask 255.255.255.0 broadcast 192.168.12.255 up`
Install iptables and ipv6-KERNEL packages: `tce-load -wi iptables` and `tce-load -wi ipv6-KERNEL`
Enable IP forwarding at boot by appending to /opt/bootlocal.sh
tce-load -wi openssh
Installs the OpenSSH package on TinyCore VM.
sudo passwd tc
Sets the password for the default user 'tc'.
sudo sh -c 'echo "sudo /usr/local/etc/init.d/openssh start" >> /opt/bootlocal.sh'
Configures SSH to start automatically on boot.
ifconfig eth1 192.168.12.1 netmask 255.255.255.0 broadcast 192.168.12.255 up
Assigns a static IP address to the eth1 interface.
tce-load -wi iptables
Installs the iptables package for firewall and NAT configuration.
sudo sh -c 'echo "sudo sysctl -w net.ipv4.ip_forward=1" >> /opt/bootlocal.sh'
Enables IP forwarding on the TinyCore VM at boot.
sudo sh -c 'echo "sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" >> /opt/bootlocal.sh'
Sets up NAT masquerading for outbound packets on eth0.
Create /etc/eth1_udhcpd.conf with DHCP range and options
Configures the DHCP server settings for the eth1 subnet.
Create /opt/eth1.sh startup script
Script to configure eth1 interface and start the DHCP server on boot.
ssh -p 12345 tc@localhost
SSH into the TinyCore gateway VM from the host machine.