Introduction

The easySIPp Docker container requires direct network access to bind to host system IP addresses, which is achieved using the --network host parameter. While this works seamlessly on Linux, it presents challenges on Windows Docker Desktop due to the way Docker networking is implemented on Windows.

The solution is to run easySIPp on WSL2 (Windows Subsystem for Linux 2) with mirrored networking mode, which allows the container to access the host network properly.

Why This Matters: The SIPp tool inside easySIPp needs to bind to specific IP addresses on your network interfaces for proper SIP testing. Without --network host, SIPp cannot access the host's network interfaces, making it unable to send and receive SIP traffic correctly.

Windows Version Requirements

For WSL2 with mirrored networking mode, you need:

Step 1: Install WSL2

  1. Open PowerShell as Administrator:
    • Press Windows + X
    • Select "Windows PowerShell (Admin)" or "Terminal (Admin)"
  2. Install WSL with the default Ubuntu distribution:
    wsl --install
  3. Restart your computer when prompted
  4. After restart, Ubuntu will automatically open and complete installation
    • Wait for "Installing, this may take a few minutes..."
    • Create a UNIX username (lowercase, no spaces)
    • Create a password (you won't see characters while typing - this is normal)

Verify WSL2 Installation

# Check WSL version
wsl --list --verbose

# Should show:
# NAME      STATE           VERSION
# Ubuntu    Running         2

If VERSION shows 1 instead of 2, convert it:

wsl --set-version Ubuntu 2

Step 2: Configure Mirrored Networking Mode

Mirrored networking mode allows WSL2 to use the host's network interfaces directly, which is essential for easySIPp to work with --network host.

Check Windows Build for Mirrored Networking Support

Create WSL Configuration File

  1. Open PowerShell or Command Prompt
  2. Navigate to your user folder: cd ~ from PowerShell or cd %USERPROFILE% from Command Prompt
  3. Create a .wslconfig file:
    notepad .wslconfig
  4. Add the following configuration:
    [wsl2]
    networkingMode=mirrored
  5. Save the file:
    • Press Ctrl + S
    • Close Notepad

Apply the Configuration

  1. Shutdown WSL to apply changes:
    wsl --shutdown
  2. Wait 10 seconds
  3. Restart WSL by opening Ubuntu from Start Menu or using just wsl command in PowerShell/Terminal or Command Prompt.

Verify Mirrored Networking

Inside Ubuntu (WSL2), run:

ip a

The WSL2 IP addresses should match to Windows host IPs

⚠️ Troubleshooting: If mirrored networking doesn't work:

Step 3: Install Docker in WSL2

Now we'll install Docker directly inside WSL2 (not Docker Desktop).

Add Docker's Official GPG Key

# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources: # Run following sudo tee command all at once
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update

Install Docker Engine

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Start Docker Service

# Start Docker
sudo service docker start

# Verify Docker is running
sudo service docker status

Verify Docker Installation

# Test Docker
sudo docker run hello-world

# Should see: "Hello from Docker!"

To run docker commands without sudo (Optional but Recommended)

Add Your User to Docker Group

# Add current user to docker group
sudo usermod -aG docker $USER

# Apply group changes (logout and login, or use newgrp)
newgrp docker

# Verify (should work without sudo now)
docker --version

Configure Docker to Start Automatically (Optional)

Add this to your ~/.bashrc file so Docker starts when you open Ubuntu:

# Open bashrc
nano ~/.bashrc

# Add at the end:
if service docker status 2>&1 | grep -q "is not running"; then
    sudo service docker start
fi

# Save: Ctrl+O, Enter, Ctrl+X

# Apply changes
source ~/.bashrc

Step 4: Install easySIPp

Now that WSL2, mirrored networking, and Docker are configured, we can install easySIPp.

Pull the easySIPp Docker Image

docker pull krndwr/easysipp:latest

Run easySIPp Container

docker run -dt --network host --name easysipp krndwr/easysipp

Command Breakdown:

Verify Container is Running

docker ps

# Should show:
# CONTAINER ID   IMAGE              STATUS          PORTS     NAMES
# xxxxxxxxxx     krndwr/easysipp    Up XX seconds             easysipp

Access easySIPp Web Interface

Open your browser (on Windows, not inside WSL) and navigate to:

http://localhost:8080

You should see the easySIPp web interface!

Step 5: Managing easySIPp Container

Daily Usage Commands

Check Container Status

docker ps -a

Start Container (if stopped)

docker start easysipp

Stop Container

docker stop easysipp

Restart Container

docker restart easysipp

Updating easySIPp

# Stop and remove old container
docker stop easysipp
docker rm easysipp

# Pull latest image
docker pull krndwr/easysipp:latest

# Run new container
docker run -dt --network host --name easysipp krndwr/easysipp

⚠️ Data Loss Warning: Removing the container will delete any custom configurations or scenarios. Back up important files before updating.

Complete Removal

# Stop and remove container
docker stop easysipp
docker rm easysipp

# Remove image
docker rmi krndwr/easysipp

Performance Tips

Optimize WSL2 Performance

  1. Allocate adequate resources in .wslconfig:
    [wsl2]
    memory=4GB
    processors=2
    networkingMode=mirrored
  2. Keep WSL2 updated:
    wsl --update

Next Steps

Now that easySIPp is running on your Windows machine via WSL2:

Summary

You've successfully:

Your Windows machine is now ready for professional SIP/VoIP testing with easySIPp! The mirrored networking setup ensures that SIPp can bind to your network interfaces properly, giving you the full functionality of easySIPp even on Windows.

Additional Resources

← Back to
All Tutorials
Next Tutorial →
Getting Started