Skip to content

Instantly share code, notes, and snippets.

@EmbeddedAndroid
Created September 15, 2013 17:38
Show Gist options
  • Save EmbeddedAndroid/6572848 to your computer and use it in GitHub Desktop.
Save EmbeddedAndroid/6572848 to your computer and use it in GitHub Desktop.
Mac OSX (10.8.X) /etc/qemu-ifdown script for QEMU/KVM bridged networking.
#!/bin/bash
echo "Executing /etc/qemu-ifdown"
echo "Bringing TAP interface down"
ifconfig $1 down
echo "Removing interfaces"
ifconfig bridge0 deletem en0 deletem $1
echo "Bring down bridge"
ifconfig bridge0 down
echo "Removing bridge"
ifconfig bridge0 destroy
sysctl -w net.link.ether.inet.proxyall=0
sysctl -w net.inet.ip.forwarding=0
sysctl -w net.inet.ip.fw.enable=0
@EmbeddedAndroid
Copy link
Author

Glad you found it useful, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment