#! /bin/bash
#qemu-ipdown脚本
tmpbridge=ecoengine0
if [ -n "$1" ];then
#删除网桥网卡
	/opt/apps/tech.sanway.ecoengine/files/bin/brctl delif $tmpbridge $1
fi
#关闭网桥
ip link set $tmpbridge down
#删除网桥
/opt/apps/tech.sanway.ecoengine/files/bin/brctl delbr $tmpbridge
#关闭物理网卡的转发功能
iptables -t nat -D POSTROUTING -s 192.168.100.0/24 ! -d 192.168.100.0/24 -j MASQUERADE
iptables -D FORWARD -s 0/0 -j ACCEPT
sysctl -w net.ipv4.ip_forward=0
