Embedded Monowall: Installation


UPDATE: An updated tutorial has been posted here: https://www.techunplugged.com/2009/07/22/alix-monowall-firewall-part-1/
This tutorial will guide you through copying the m0n0wall image to a compact flash card and the initial configuration of the m0n0wall on the ALIX embedded board. I will be using a VPN accelerator card since I will have about 10 IPsec tunnels actively running at one time. I would only recommend using the VPN accelerator card if you plan on maintaining several VPN tunnels at one time, otherwise it is overkill. The following is a list of the items that were used:

Obtained from netgate.com: http://www.netgate.com/ PC Engines ALIX 2C3 embedded board ALIX 2C3 enclosure 512MB Compact Flash Card Power Adapter
Obtained from soekris.com: http://www.soekris.com/ VPN1411 mini-pci card (VPN Accelerator Card)
I will be setting this up using a Mac Pro running OS/X Leopard. I will be using a USB to Serial cable with a Null Modem adapter. This cable will be used to interface between the ALIX board and the Mac for initial configuration purposes. During the initial setup it is best to keep the board outside the enclosure as there is no space to remove or insert the card.
To begin we will download the following files and placing them on your desktop:
Bootable image of Freedos with ALIX Bios: http://www.pcengines.ch/file/freedos3.zip Embedded m0n0wall image: http://m0n0.ch/wall/download.php?file=wrap-1.3b11.img
The first thing we are going to do is make sure that the newest version of the bios is installed on the ALIX board. To do this we will copy the Freedos image to the CF card.

  1. Insert CF card into a card reader attached to the Mac
  2. Open ‘Disk Utility’ and click on any partition on the CF card and click ‘unmount’. Repeat the previous step on every partition listed under the CF card.
  3. Right click on the CF card inside Disk Utility and select information.
  4. Write down the disk# listed next to ‘Disk Identifier’
  5. Open Terminal
  6. Type: cd Desktop
  7. Type: cat freedos_alixupdate_0.99.img | dd of=/dev/disk# bs=16k (replace disk# with what was listed in step 2 [ie disk6])
  8. Eject the CF disk
  9. Remove the CF card from the reader and insert it into the ALIX board
  10. Connect the ALIX board to the Mac with the USB to Serial cable with the null modem adapter attached. Within terminal hit Command-T to open a new session
  11. In the new session type: screen /dev/tty.usbserial 38400
  12. Apply power to the ALIX board, you will see the board boot within the terminal session. When it completes boot and displays the C: prompt, type: sb and hit enter If you have an older version bios it will be updated, if not the command will just complete.
  13. Remove power from the ALIX board

Next we will copy the m0n0wall image to the CF card. Keep the terminal screen open from the previous steps.

  1. Insert the CF card into the card reader.
  2. Open Disk Utility and unmount and partitions listed on the CF card.
  3. Go to the terminal screen that is already open and go to the previous session.
  4. Type: gzcat wrap-1.3b11.img | dd of=/dev/disk# bs=16k (Replace disk# with the actual disk that was listed next to the disk identifier)
  5. Remove the CF card from the card reader
  6. Insert the CF card into the ALIX board.
  7. Within terminal switch to the other session (the session in which you watched the ALIX boot)
  8. Apply power to the ALIX board and watch it boot.
  9. When it is completed booting you will see a menu screen.
  10. Type: 1 (Assign network ports)
  11. Type: n (Assign VLAN)
  12. Type: vr0 (Lan Port)
  13. Type: vr2 (Wan Port)
  14. Hit Return (To skip optional port)
  15. Type: y (Reboot system)
  16. Once the system has rebooted you will see the menu again
  17. Type: 2 (Setup Lan address)
  18. Type: 192.168.240.1 (Or change 240 to another number between 0-254)
  19. Type: 24 (For the subnet 255.255.255.0)
  20. Type: y (To enable DHCP)
  21. Type: 192.168.240.100 (Beginning of the DHCP client range, change 240 to whatever number you changed in the previous step.)
  22. Type 192.168.240.199 (End of the client range, change 240 to whatever number you changed it to in the previous step.)
  23. Hit Enter (The unit is now configured)
  24. Pull the power from the unit.

You can now install the ALIX board into the enclosure. Once it is installed you can hook up the unit to your LAN using the network jack closest to the power jack (vr0). You can hook up your Cable/DSL Modem to the Wan port (VR2) which is next to the serial port. Apply power to the unit and give it a minute to boot up. Open up a web browser and point it to: 192.168.240.1 (If you changed LAN address to something other than 240 change it here respectively as well). This will bring up the GUI interface for the rest of the configuration. Right out of the box it will operate as a basic router. In the a following segments I will walk you through setting up more advanced features such as:

  • PPTP
  • IPsec Tunnels
  • Port Forwarding
  • Dynamic DNS

One Reply to “Embedded Monowall: Installation”

  1. John,
    Like yourself I’d been a PC user who made the switch to the Apple. However yesterday I had to drag out my PC laptop in order to use a terminal session with the Alix board. No matter what I tried according to your suggestions my Mac Pro laptop could not establish a session with the Alix board. I ended using HyperTerminal on the PC laptop. Which USB to DB9 connector/cable were you using? I did note that the Cables Unlimited connector I was using required the loading of its drivers before it would work with my PC. Thanks for any assistance offered
    -Ike

Leave a Reply

Your email address will not be published. Required fields are marked *