Category Archives: WanEm

Clone Virtual Machine – Linux (debian) – eth0 missing

Today I found a solution for a problem which was bugging me for a while now.  (I encountered this error when I tried to clone my WanEm virtual machine.)

If you clone a virtual machine (created via Hyper-V, Virtualbox, VMWare, …) which is using Linux as an operating system you will notice that the cloned machine is missing the eth0 network interface. That´s strange because you added a network adapter during it´s creation.

If you run the following command in the terminal:

ifconfig eth0 up

You will receive the following error message:

eth0: ERROR while getting interface flags: No such device

So what could have gone wrong? The answer is quite simple: You added a new network adapter with a different MAC address and Linux was not able to detect this change. What can you do to solve this problem? The solution is also quite simple.

Here it is:

Run the following commands:

sudo rm /etc/udev/rules.d/z25-persistent-net.rules
sudo reboot

After the operating system successfully rebooted your problem will be solved.

If you now run

ifconfig -a

you will see that there is an eth0 interface now.


Tagged , ,

Add www-data user to sudoers file (WANEM)

Hi. In this post I´ll show you how to add the www-data user to the sudoers file. The reason why I am blogging about this is the following: If you followed my Instructions to install WANEM like in my previous post “Installation of WANEM” you will notice that you can not apply settings to your WANEM machine via the configuration website. But why is that so?

Well, you can not apply settings to your WANEM machine via the configuration website because the user www-data who wants to apply your settings for you on the machine does not have the permissions to do so. This can be a very annoying mistake so I decided to write down the solution.

I will show you how you can solve this problem.

Before we begin I recommend that you make a backup of your current sudoers file.

sudo cp /etc/sudoers /etc/sudoers-old

Now we need to edit it.

sudo nano /etc/sudoers

You need to add the following line to the sudoers file to grant the www-data user the appropriate permissions:


That´s it. Now all you need to do is reboot your machine and try to apply your settings. It should work now.



Enable IP Forwarding in WANEM

In this post I will show you how you can enable IP Forwarding permanently in WANEM if you installed it to a hard disk like I have shown you in my last post “Installation of WANEM“.

Important Note: The following steps will only work if you chose debian as System like I did.

You can check if IP Forwarding is enabled with the following command:

sudo cat /proc/sys/net/ipv4/ip_forward

If you receive 0 as an answer it means that IP Forwarding is disabled. If you receive 1 as an answer it means that IP Forwarding is already enabled.

Before you perform the steps to enable IP Forwarding I would recommend you make a backup of the options file in case you want to revert the configuration. You can do this with the following command:

sudo cp /etc/network/options /etc/network/options-old

Ok. Now we will enable IP Forwarding.

The First step is to edit the options file. I used nano to edit the options file.

sudo nano /etc/network/options

You need to change this line from




Now press Ctrl+O to write the changes to the file and press Ctrl+X to exit nano.

Now the last step is to restart the networking service. You can do this with this command:

sudo /etc/init.d/networking restart

That´s it. IP Forwarding is now enabled.



Installation of WANEM

WANEM is used to emulate WAN links. It is often used for testing applications over long distances with high delays and packet loss. You can use WANEM running on a physical or virtual machine using the Live CD Image provided here. You can use it as it is or you can install it on your hard disk so you don´t have to do the same configurations every time.

I will show you how to install WANEM on a virtual machine using Microsoft Hyper V.

By the way: I used WANEM v2.3.

The first step is to download the WANEM Image. You can download it from here.

Now you need to create a new virtual machine. I called my virtual machine “WanEm”, assigned 512MB RAM and created a new VHDX hard disk with 10GB capacity.Create_Virtual_Machine_0Create_Virtual_Machine_1Create_Virtual_Machine_2

Now go to you virtual machine´s settings. Since the default Network adapter Hyper V assigns to virtual machines will not work you need to remove it and replace it with a “Legacy Network Adapter“.


Now start you virtual machine and insert the WANEM Image you downloaded earlier.

You will be welcomed by the screen below. Press ENTER to continue.



If you are asked if you want to configure all interfaces via DHCP choose no. You will need to configure a static IP address later so you can access the built-in website to configure WANEM.


Hit ESC to Exit.

If you are asked for a password for the user perc just enter a new password and confirm it by retyping it.

Now exit to the Shell by typing



To start the installation enter






Choose Partition.


Select your hard disk you created earlier. (Use SPACE to select the disk.)


Now create a new partition. I chose to use the Template.



Now choose Configure Installation.


Now choose your system. I chose debian.


Choose the partition you want to install your system to.


Now you will be asked what filesystem-type you want to use. I chose ext3.

After that you will be asked to create a new user and assign that user a password. And you will be asked to assign a new password to the Administrator account (root). And you need to assign a computer name.


Next you will be asked where you want to install the boot-loader. I chose mbr.


Now you can choose Start Installation.


Now is the last chance to check your configuration. If you hit Next the installation will start.


After the installation process has finished you will be asked to insert a floppy into your floppydrive. Ignore this part and choose No.


That´s it. The installation process was successful.

Now enter



Your machine is now ready to use.

If you don´t want to go through all these steps by yourself you can download the VHD Image I prepared for you from here.


Tagged ,