Skip to content

Instantly share code, notes, and snippets.

@ArseniyShestakov
Last active July 18, 2016 08:05
Show Gist options
  • Save ArseniyShestakov/052fded18bbbb5fe8959590f9a7dd64b to your computer and use it in GitHub Desktop.
Save ArseniyShestakov/052fded18bbbb5fe8959590f9a7dd64b to your computer and use it in GitHub Desktop.
Bridge setup on Ubuntu 16.04
# Remove all exist connections
# http://www.rene-pickhardt.de/cleaning-up-my-network-connections-on-ubuntu-linux-using-the-network-manager-nmcli/
for i in `nmcli c | \
grep -o -- "[0-9a-fA-F]\{8\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{12\}"` ; \
do nmcli connection delete uuid $i ; \
done
# "main" is name of bridge
nmcli con add type bridge ifname main
# "enp0s25" is name of your real interface
nmcli con add type bridge-slave ifname enp0s25 master bridge-main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment