code: func (i IptablesMngr) Sync(s state.State) error {
  	start := time.Now()
  	defer func() {
  		log.Debugf("[iptables ] Sync took %v", time.Since(start))
  	}()
  
  	log.Debug("[iptables] Syncing")
  
  	stateSet, err := i.getStateRulesSet(s)
  	if err != nil {
  		return err
  	}
  
  	kernelSet, err := i.getKernelRulesSet()
  	if err != nil {
  		return err
  	}
  
  	rulesToAdd := stateSet.Difference(kernelSet)
  	rulesToRemove := kernelSet.Difference(stateSet)
  
  	// Adding missing rules
  	for r := range rulesToAdd.Iter() {
  		rule := r.(SnatRule)
  		err := i.addRule(rule)
  		if err != nil {
  			return err
  		}
  		log.Debugf("[iptables] Added rule: %#v", rule)
  	}
  
  	// Cleaning rules
  	for r := range rulesToRemove.Iter() {
  		rule := r.(SnatRule)
  		err := i.removeRule(rule)
  		if err != nil {
  			return err
  		}
  		log.Debugf("[iptables] Removed rule: %#v", rule)
  	}
  
  	return nil
  }
docs: // Sync syncs all iptables rules