Skip to content

Automatically generate virtual macs for your IP range

Notifications You must be signed in to change notification settings

virtkick/ovh-mac-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ovh-mac-generator

This project contains three scripts that enable you to easily and programmatically generate vMAC (virtualMac) addresses for all IP addresses in a certain range with OVH.

Requirements

  • Node.js >= 4.0.0

Setup

  • Obtain Node.js 4.0.0 or above and NPM
  • Clone this repo
  • cd to the ovh-mac-generator directory
  • npm install

Configuration

  • Create an OVH application In the US / In Europe - other options available here
  • cp config.js.example config.js
  • Put the APP_KEY and APP_SECRET in the appropriate spots in config.js. Possible endpoints can be found here - the service name is the name of your server available in the OVH control panel.
  • node authorize.js. You will see something like this:
Success!
Please do the following:
1. Take the consumerKey and add it to config.js
2. Visit the validationUrl and authorize this application
3. Run node IP_RANGE=$YOURNETWORKRANGE generator.js
{ validationUrl: 'https://ca.api.ovh.com/auth/?credentialToken=sloth',
  consumerKey: 'turtle',
  state: 'pendingValidation' }

Usage

  • IP_RANGE=1.1.1.1/24 node generator.js - substitute your IP range using CIDR notation. This will take a while to run, once it stops proceed on to the last step.
  • node listgen.js <ovh-ca|ovh-eu> <ns1234.ip-1-2-3.net> <1.2.3.4/5> - This will take a minute or so depending on how many IPs you have total, once it is done you will get a list of IP addresses and vMACs.
  • You should be done. If you are Virtkick user you can copy and paste the list right into the OVH mapping box to set up your new range in the Virtkick panel.

About

Automatically generate virtual macs for your IP range

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%