Skip to content

Instantly share code, notes, and snippets.

@guyromm
Created October 23, 2018 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guyromm/acdf656d85b9fbd01b927e9c3abb5496 to your computer and use it in GitHub Desktop.
Save guyromm/acdf656d85b9fbd01b927e9c3abb5496 to your computer and use it in GitHub Desktop.
generate some mac addresses for masquerading with ebtables
python -c "for a in xrange(0x00,0xff+1): print(format(a,'X').zfill(2).lower())" | \
awk '{print "ebtables -t nat -A POSTROUTING -s 00:16:3e:"$1":95:60 -j snat --to-src 38:d5:47:0:c:ed --snat-target ACCEPT --log --log-level=warning --log-prefix=MACREWRITE"}' | \
tee /tmp/ebatron.sh && \
bash /tmp/ebatron.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment