'Stop NAT/forwarding between Mininet and external network'

def terminate(self):

    self.cmd('iptables    -D    FORWARD', '-i', self.localIntf, '-d', self.subnet, '-j    DROP')
    self.cmd('iptables    -D    FORWARD', '-i', self.localIntf, '-s', self.subnet, '-j    ACCEPT')
    self.cmd('iptables    -D    FORWARD', '-o', self.localIntf, '-d', self.subnet, '-j    ACCEPT')
    self.cmd('iptables    -t    nat    -D    POSTROUTING', '-s', self.subnet, "'!'", '-d', self.subnet, '-j    MASQUERADE')
    self.cmd(('sysctl    net.ipv4.ip_forward=%s' % self.forwardState))
    super(NAT, self).terminate()
