Skip to content

Instantly share code, notes, and snippets.

@tmathmeyer
Last active August 29, 2015 14:17
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 tmathmeyer/a62a965d79ad518d4b97 to your computer and use it in GitHub Desktop.
Save tmathmeyer/a62a965d79ad518d4b97 to your computer and use it in GitHub Desktop.
ip link add link enp0s25 name IP type vlan ip 101
ip link add link enp0s25 name CP type vlan ip 102
ip addr add 10.44.37.2/26 brd 10.44.37.255 dev IP
ip addr add 10.44.37.66/26 brd 10.44.37.255 dev CP
ip link set dev IP up
ip link set dev CP up
sysctl -w net.ipv4.conf.all.forwarding=1
iptables -A FORWARD -i IP -o CP -j ACCEPT
iptables -A FORWARD -i CP -o IP -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment