Created
September 15, 2013 17:38
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Glad you found it useful, cheers!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are a legend! I work with OS X as my main development machine at work and this is exactly what I needed (someone else that's already worked this out!). Thanks heaps!