Advertisement
wagnux

sysctl.conf

Oct 15th, 2016
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.64 KB | None | 0 0
  1. ## Configuração para otimização do uso de memória RAM no Ubuntu
  2.  
  3. # /etc/sysctl.conf - Configuration file for setting system variables
  4. # See /etc/sysctl.d/ for additional system variables
  5. # See sysctl.conf (5) for information.
  6. #
  7.  
  8. #kernel.domainname = example.com
  9.  
  10. # Uncomment the following to stop low-level messages on console
  11. #kernel.printk = 3 4 1 3
  12.  
  13. ##############################################################3
  14. # Functions previously found in netbase
  15. #
  16.  
  17. # Uncomment the next two lines to enable Spoof protection (reverse-path filter)
  18. # Turn on Source Address Verification in all interfaces to
  19. # prevent some spoofing attacks
  20. #net.ipv4.conf.default.rp_filter=1
  21. #net.ipv4.conf.all.rp_filter=1
  22.  
  23. # Uncomment the next line to enable TCP/IP SYN cookies
  24. # See http://lwn.net/Articles/277146/
  25. # Note: This may impact IPv6 TCP sessions too
  26. #net.ipv4.tcp_syncookies=1
  27.  
  28. # Uncomment the next line to enable packet forwarding for IPv4
  29. #net.ipv4.ip_forward=1
  30.  
  31. # Uncomment the next line to enable packet forwarding for IPv6
  32. #  Enabling this option disables Stateless Address Autoconfiguration
  33. #  based on Router Advertisements for this host
  34. #net.ipv6.conf.all.forwarding=1
  35.  
  36.  
  37. ###################################################################
  38. # Additional settings - these settings can improve the network
  39. # security of the host and prevent against some network attacks
  40. # including spoofing attacks and man in the middle attacks through
  41. # redirection. Some network environments, however, require that these
  42. # settings are disabled so review and enable them as needed.
  43. #
  44. # Do not accept ICMP redirects (prevent MITM attacks)
  45. #net.ipv4.conf.all.accept_redirects = 0
  46. #net.ipv6.conf.all.accept_redirects = 0
  47. # _or_
  48. # Accept ICMP redirects only for gateways listed in our default
  49. # gateway list (enabled by default)
  50. # net.ipv4.conf.all.secure_redirects = 1
  51. #
  52. # Do not send ICMP redirects (we are not a router)
  53. #net.ipv4.conf.all.send_redirects = 0
  54. #
  55. # Do not accept IP source route packets (we are not a router)
  56. #net.ipv4.conf.all.accept_source_route = 0
  57. #net.ipv6.conf.all.accept_source_route = 0
  58. #
  59. # Log Martian Packets
  60. #net.ipv4.conf.all.log_martians = 1
  61. vm.swappiness = 5
  62. vm.vfs_cache_pressure = 50
  63. net.core.rmem_default = 524288
  64. net.core.rmem_max = 524288
  65. net.core.wmem_default = 524288
  66. net.core.wmem_max = 524288
  67. net.ipv4.tcp_wmem = 4096 87380 524288
  68. net.ipv4.tcp_rmem = 4096 87380 524288
  69. net.ipv4.tcp_mem = 524288 524288 524288
  70. net.ipv4.tcp_rfc1337 = 1
  71. net.ipv4.ip_no_pmtu_disc = 0
  72. net.ipv4.tcp_sack = 1
  73. net.ipv4.tcp_fack = 1
  74. net.ipv4.tcp_window_scaling = 1
  75. net.ipv4.tcp_timestamps = 1
  76. net.ipv4.tcp_ecn = 0
  77. net.ipv4.route.flush = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement