sysctl.conf.j2 1.1 KB

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