This howto is based on the article “Server im Bauch” in the german magazine c’t 02/05, pages 96 to 99. The website of the original author Sven Ahnert is www.vmaschinen.de.
You will need VMware Workstation. I used version 4.5.1 on Windows XP Pro with 2 real NICs (one for DSL, one for my LAN). This howto explains how you can setup IPCop in a virtual machine and how you even can have servers in different virtual machines on your (virtual) orange network.
1) Create a new virtual machine: File -> New Virtual Machine.
In the wizard choose the following configuration: custom, Linux (Other Linux 2.6.x kernel), 32 MB RAM, Bridged Networking, SCSI Adapters Buslogic, Create a new virtual disk, Virtual Disk Type IDE, Disk Size 1 GB or greater if you need.
2) Update the hardware configuration: VM -> Settings
- remove USB controller and Audio
- add 2 more Ethernet Adapters
- the first NIC must be “Host-only” (green)
- the second “Custom” with a virtual switch “VMnet2″ (orange)
- the third “Bridged” (red)
3) Doubleclick on the virtual CD-Rom drive and choose “Use ISO image”, browse to an IPCop iso on your local harddrive.
4) Start the virtual machine, go through the IPCop startup configuration.
- green: 192.168.2.2 and 255.255.255.0 as subnet
- orange: 192.168.3.1, 255.255.255.0
- red: PPPoE
5) Good time to make a snapshot.
6) In VMware: Edit -> Virtual Network Settings -> Host Virtual Network Mapping
- VMNet1: click “…” and change “Subnet” to the IP-address 192.168.2.0 and 255.255.255.0
- VMNet0: bind the NIC for your DSL connection
7) In a web browser open https://192.168.2.2:445
-> Configure your internet connection under Network -> Dialup
8) Go to the windows network configuration on your Host PC, choose options for the VMware Network Adapter VMnet1 and set gateway and DNS to 192.168.2.2 (IP address and subnet should already be set to 192.168.2.1, 255.255.255.0).
9) Bind your DSL NIC only to the VMware Bridge Protocol, uncheck everything else.
10) Use this configuration for the LAN NIC on your Host PC: 192.168.1.1, 255.255.255.0, gateway 192.168.2.1, DNS 192.168.2.2
11) Configure your LAN PCs: 192.168.1.x, 255.255.255.0, gateway 192.168.1.1, DNS 192.168.2.2
12) Log in as root on your IPCop machine and use the following command:
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
If you add it to rc.local you dont have to enter it every time you restart your virtual machine.
13) Virtual server on orange: 192.168.3.2, 255.255.255.0, gateway 192.168.3.1, DNS from your ISP, use custom networking in VMware for the virtual NIC and bind it to the virtual switch VMnet2.
A very good illustration about the networking setup is provided in
www.vmaschinen.de/download/dmz_netzwerkzeichnung.pdf at page 3.