Example #1
0
func disableArpAnnounce() error {
	if err := net.SetSysctl("net.ipv4.conf.all.arp_announce", "2"); err != nil {
		return errors.Wrap(err, "setting net.ipv4.conf.all.arp_announce to 2 failed")
	}

	if err := net.SetSysctl("net.ipv4.conf.all.arp_ignore", "1"); err != nil {
		return errors.Wrap(err, "setting net.ipv4.conf.all.ignore to 1 failed")
	}

	return nil
}
Example #2
0
func enableContrack() error {
	if err := net.SetSysctl("net.ipv4.vs.conntrack", "1"); err != nil {
		return errors.Wrap(err, "enabling Contrack failed")
	}

	return nil
}