|
Christian Boltz |
f0dd9a |
# Increase the maximum amount of option memory buffers
|
|
Christian Boltz |
f0dd9a |
net.core.optmem_max = 65536
|
|
Christian Boltz |
f0dd9a |
# Increase the tcp-time-wait buckets pool size to prevent simple DOS attacks
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_max_tw_buckets = 1440000
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_tw_recycle = 1
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_tw_reuse = 1
|
|
Christian Boltz |
f0dd9a |
# Limit number of orphans, each orphan can eat up to 16M (max wmem) of unswappable memory
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_max_orphans = 16384
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_orphan_retries = 0
|
|
Christian Boltz |
f0dd9a |
# Increase the maximum memory used to reassemble IP fragments
|
|
Christian Boltz |
f0dd9a |
net.ipv4.ipfrag_low_thresh = 446464
|
|
Christian Boltz |
f0dd9a |
# Increase TCP queue length
|
|
Christian Boltz |
f0dd9a |
net.ipv4.neigh.default.proxy_qlen = 96
|
|
Christian Boltz |
f0dd9a |
net.ipv4.neigh.default.unres_qlen = 6
|
|
Christian Boltz |
f0dd9a |
net.core.rmem_default = 16777216
|
|
Christian Boltz |
f0dd9a |
net.core.wmem_default = 16777216
|
|
Christian Boltz |
f0dd9a |
net.core.rmem_max = 16777216
|
|
Christian Boltz |
f0dd9a |
net.core.wmem_max = 16777216
|
|
Christian Boltz |
f0dd9a |
# TCP Autotuning setting: how the TCP stack should behave when it comes to memory usage
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_mem=8388608 8388608 8388608
|
|
Christian Boltz |
f0dd9a |
# TCP Autotuning setting: receive buffer
|
|
Christian Boltz |
f0dd9a |
#net.ipv4.tcp_rmem=4096 87380 8388608
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_rmem=1048576 4194304 16777216
|
|
Christian Boltz |
f0dd9a |
# TCP Autotuning setting: how much TCP sendbuffer memory space each TCP socket has to use
|
|
Christian Boltz |
f0dd9a |
#net.ipv4.tcp_wmem=4096 65536 8388608
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_wmem=1048576 4194304 16777216
|
|
Christian Boltz |
f0dd9a |
# Disable Log Spoofed Packets, Source Routed Packets, Redirect Packets
|
|
Christian Boltz |
f0dd9a |
net.ipv4.conf.all.log_martians = 0
|
|
Christian Boltz |
f0dd9a |
net.ipv4.conf.default.log_martians = 0
|
|
Christian Boltz |
f0dd9a |
# Decrease the time default value for tcp_fin_timeout connection
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_fin_timeout = 15
|
|
Christian Boltz |
f0dd9a |
# Decrease the time default value for connections to keep alive
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_keepalive_time = 300
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_keepalive_probes = 5
|
|
Christian Boltz |
f0dd9a |
net.ipv4.tcp_keepalive_intvl = 15
|
|
Christian Boltz |
f0dd9a |
|