Install virtual Router/Gateway

Download ipfire

Processor i586-compatible x86 CPU with 1 GHz or better or a supported ARM SBC Memory 1GB or greater Storage at least 4GB of harddisk storage Network at least two Ethernet network adapters

Create VM

  • Download and install virtualbox including VirtualBox Extension Pack

  • Launch Virtual box

  • Create a new virtual machine. Either click on Machine -> New… from the menu or click on New button on the toolbar.

  • Type a name for the VM, select Linux for type and set Version as Other Linux (64 bit) and click Next

  • Use recommended memory of 1Gb or use the default 512Mb and click Next

  • Click Create to create the VM Hard disk and select the hard disk file type or click next to use VDI

  • Click Next to use Dynamically allocated disk

  • On File location and size, click Create to use the default location and size or modidy the size and location to fit your needs and click Create

  • Select the created VM and click on Settings on the toolbar

  • Select on Storage tab and then select the empty CD-ROM icon under Controller: IDE. Click on the CD-ROM icon which is at the far right of Optical Drive. Click on Choose Virtual Optical Disk File… to locate the ipfire ISO that you downloaded.

  • After you locate your ISO file, click on Open

  • We need two network adapter so select on Network

    • Change Adapter 1 to Bridged Adapter. Click Advanced to show extra settings and note the MAC address.
    • Select Adapter 2 and change it to Internal Network. Click Advanced to show extra settings and note the MAC address.
  • Click OK

  • Click on the Start button on the toolbar to start installation for ipfire

  • Press ENTER key on the welcome screen to accept the selected option and continue with installation

  • Select language and press Enter

  • Press Enter to Start Installation

  • Accept the License Agreement and press Enter to continue

  • Press Enter on Disk Setup to Delete all data

  • Press Enter to accept the selected filesystem - ext4 Filesystem

  • Wait for installation to complete and press Enter to Reboot the system

  • After system reboot, press Enter to accept the default selection

  • Press Enter to accept keyboard mapping

  • Use up/down arrow key to select your timezone and press Enter

  • Enter the VM hostname or use the provided default name ipfire

  • Press Enter to accept the provided domain name or enter your own domain name and press Enter

  • Provide a password for the root user and press Enter. Please note that no characters will be displayed as you type the passwords

  • Provide password for admin user. This will be used to login via web

  • I will use the default network configuration which is GREEN + RED. This means two network adapters will be used. GREEN is for the internal network (LAN) and RED refers to the external netword (WAN). In my case RED will be adapter 1 and GREEN will be Adapter 2.

  • Press the down arrow key to select Drivers and card assignments and press Enter

  • Press Enter to configure internal network (GREEN). Use arrow keys to select the correct adapter and press Enter. This is the reason I said above that we note the last for characters of each network adapter.

  • Use the arrow keys to select Externak network (RED) and press Enter. Only one card will now be available since we have already assigned the other one to GREEN. So press Enter to assign it to RED.

  • Press Tab until Done is selected and Press enter

  • Press down arrow key to select Address Settings and press Enter

  • Press Enter assign address for Green Adapter and press Enter to igonoer the warning

  • Provide address for LAN adapter and press Enter when done

  • Press the down arrow to select RED and press Enter

  • Provide a static address for the RED adapter and press Enter

  • Tab to select Done and press Enter

  • Press down arrow key to select DNS and Gateway settings and press Enter. Enter the addresses of the DNS Server and Default Gateway and press Enter.

  • Tab to select Done and press Enter

  • I will be using a separate DHCP Server so there is no need of enabling DHCP. So tab to select OK and press enter

  • And the setup is complete

How to run DD-WRT x86/x64 VM (Virtual Machine) in VirtualBox

How to run dd-wrt on a Virtual machine.

Create a virtual router (DD-WRT) in VirtualBox


A Simple OpenBSD Router For Your Virtual Machines

HowTo: Software Routers on Virtual Machines

Oracle VM VirtualBox: Networking options and how-to manage them