Skip to content

Instantly share code, notes, and snippets.

@simonsmh
Last active May 20, 2023 09:44
Show Gist options
  • Save simonsmh/d5531ea7e07ef152bbe8e672da1ddd65 to your computer and use it in GitHub Desktop.
Save simonsmh/d5531ea7e07ef152bbe8e672da1ddd65 to your computer and use it in GitHub Desktop.
kernel.domainname = localhost
kernel.panic = 20
vm.swappiness = 0
fs.file-max = 512000
net.core.default_qdisc = fq
net.core.netdev_max_backlog = 512000
net.core.rmem_default = 26214400
net.core.rmem_max = 26214400
net.core.somaxconn = 512000
net.core.wmem_default = 26214400
net.core.wmem_max = 26214400
net.ipv4.ip_no_pmtu_disc = 1
net.ipv4.ip_default_ttl = 128
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.ip_local_reserved_ports = 1234
net.ipv4.neigh.default.gc_interval = 30
net.ipv4.neigh.default.gc_stale_time = 30
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_dsack = 1
net.ipv4.tcp_ecn = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_fin_timeout = 3
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_time = 10
net.ipv4.tcp_max_syn_backlog = 10240
net.ipv4.tcp_max_tw_buckets = 10240
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_rmem = 4096 65536 4194304
net.ipv4.tcp_sack = 1
net.ipv4.tcp_syn_retries = 3
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_wmem = 4096 65536 4194304
net.netfilter.nf_conntrack_generic_timeout = 120
net.netfilter.nf_conntrack_icmp_timeout = 3
net.netfilter.nf_conntrack_max = 512000
net.netfilter.nf_conntrack_tcp_max_retrans = 3
net.netfilter.nf_conntrack_tcp_timeout_close = 3
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 3
net.netfilter.nf_conntrack_tcp_timeout_established = 120
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 3
net.netfilter.nf_conntrack_tcp_timeout_last_ack = 3
net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 3
net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 3
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 3
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 3
net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 3
net.netfilter.nf_conntrack_udp_timeout = 3
net.netfilter.nf_conntrack_udp_timeout_stream = 30
net.ipv4.conf.all.promote_secondaries = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment