sysctl.conf 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ## Networking
  2. # See https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
  3. ## IPv4 tuning
  4. # Reset all configuration parameters to RFC1812
  5. net.ipv4.ip_forward = 1
  6. # Disable routing to {{ primary_interface }}
  7. net.ipv4.conf.{{ primary_interface }}.forwarding = 0
  8. # Use larger ARP cache
  9. net.ipv4.neigh.default.gc_thresh1 = 2048
  10. net.ipv4.neigh.default.gc_thresh2 = 4096
  11. net.ipv4.neigh.default.gc_thresh3 = 8192
  12. # Maximum number of routes allowed in the kernel
  13. net.ipv4.route.max_size = 8388608
  14. ## IPv6 tuning
  15. # Configure router behaviour
  16. net.ipv6.conf.all.forwarding = 1
  17. # Disable routing to {{ primary_interface }}
  18. net.ipv6.conf.{{ primary_interface }}.forwarding = 0
  19. net.ipv6.conf.{{ primary_interface }}.accept_ra = 0
  20. # Accept Duplicate Address Detection; default = 1
  21. net.ipv6.conf.default.accept_dad = 0
  22. net.ipv6.conf.all.accept_dad = 0
  23. # Use larger neighbor table
  24. net.ipv6.neigh.default.gc_thresh1 = 2048
  25. net.ipv6.neigh.default.gc_thresh2 = 4096
  26. net.ipv6.neigh.default.gc_thresh3 = 8192
  27. # Maximum number of routes allowed in the kernel
  28. net.ipv6.route.max_size = 8388608