Debian New Installation Setup

Setup SSH Remote Access Authorization

ssh-keygen -o -a 256 -t ed25519
cp .ssh/id_ed25519.pub .ssh/authorized_keys

Setup IPv6 DHCP

nano /etc/network/interfaces
# The primary network interface
allow-hotplug enp0s6
iface enp0s6 inet dhcp
iface enp0s6 inet6 dhcp

ls Commend Colorized

nano /root/.bashrc
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

Install Netboot For reinstall system

cd /boot/efi/EFI && wget https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi

Install Some Common Softeware

apt install net-tools sudo htop git snapper wget unzip curl git software-properties-common 

Adduser To Sudo User Group

adduser user sudo

Allow UDP 443 Port

ufw allow 443/udp

Optimize TCP Throughput

nano /etc/sysctl.d/90-override.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

net.ipv4.tcp_congestion_control=bbr
net.core.default_qdisc = fq
#net.ipv4.tcp_ecn = 1
#net.ipv4.tcp_ecn_fallback = 1
net.ipv4.tcp_fack = 1

#net.ipv4.tcp_notsent_lowat = 4294967295
net.ipv4.tcp_notsent_lowat = 131072
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_keepalive_time = 1200
#net.core.netdev_max_backlog = 2048
net.core.somaxconn = 1024
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_fastopen = 3

net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_base_mss = 1024

# Ensure slow start is disabled
# https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance
net.ipv4.tcp_slow_start_after_idle = 0
#net.ipv4.tcp_no_metrics_save = 0

# 256 KB / 4 MB
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 25165824
net.core.wmem_max = 16777216

# 256 MB / 320 MB / 384 MB (TCP可用内存大小)
net.ipv4.tcp_mem = 65536 81920 98304

#net.ipv4.tcp_rmem = 4096 131072 8388608
#net.ipv4.tcp_wmem = 4096 16384 4194304
net.ipv4.tcp_rmem = 4096 131072 25165824
net.ipv4.tcp_wmem = 4096 16384 16777216

Leave a Comment