title

René Jochum

Blog of René Jochum - A FOSS enthusiast who's programming since 2002.

Emulate a Hetzner root with mininet

Emulate a Hetzner root with mininet.


I manage some root server from friends at Hetzner, as Hetzner has a "special" setup by blocking unknown Mac Addresses at theier switches, its not that easy to configure that.

The last days i played around with OpenVSwitch (A Virtual Switch, featuring VLAN's, OpenFlow, Switch To Switch Tunnels).

OpenVSwitch would allow me to add features like Firewall as a Service or IDS as a Service and it also allows me to link multiple Servers together.

BUT these servers are all in production, i can't play on them, this is where Mininet comes in use, it allows me to emulate a full network on a single VM, without touching these root Servers.

Have a look at this Script if you also need a lab to test your Hetzner Networking.

Setup from start:

  1. At first get and install a Mininet Download and Guide also see this Guide
  2. Learn howto use Mininet Sample Workflow.
  3. Edit the Script parameters in "root_network" (get the gw mac with $ arp -n on your root.
  4. Next copy the Script to your VM: $ scp hetzner.py mininet@<vm-ip>:/home/mininet/ (you might want to use sshfs).
  5. Run hetzner.py as root $ sudo ./hetzner.py
  6. Play arround with it: h1 ping gw

Have fun and please tell me when you found bugs or you have improvement ideas.