Skip to content

Instantly share code, notes, and snippets.

@skyzh
Last active August 15, 2018 03:16
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 skyzh/ad14e19b0b0e7d520e8233ba0244eafd to your computer and use it in GitHub Desktop.
Save skyzh/ad14e19b0b0e7d520e8233ba0244eafd to your computer and use it in GitHub Desktop.
Play with iptables in docker
#!/usr/bin/env bash
docker run -it --privileged --network pub_net skyzh/iptables-playground bash
#!/usr/bin/env bash
docker network create -d macvlan \
--subnet=192.168.0.0/24 \
--gateway=192.168.0.1 \
--ip-range=192.168.0.128/27 \
-o parent=eth0 -o macvlan_mode=vepa pub_net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment