Suppose I have the following script, roughly it sets up promisc mode and setup a bridge between the two networks (acting as a routing point on the mac level in a sense).
## set interfaces to promiscuous mode
ifconfig eth0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up
## add both interfaces to the virtual bridge network
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
## optional: configure an ip to the bridge to allow remote access
ifconfig br0 192.168.0.111 netmask 255.255.255.0 up
route add default gw 192.168.0.1 dev br0
script was seen here
Suppose I need to to 'turn off' the promisc mode again (creating another script to turn it off) or go back the previous configuration, is there some clever way to accomplish that ?