之前通过F12的方法,有幸喜提乌龟壳小鸡两只,在这里记录一下新开系统的一些设置
更新系统
1
| apt update && apt upgrade -y
|
改为root密码登陆
1 2 3 4
| echo root:密码 |chpasswd root sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; systemctl restart sshd
|
开启BBR
1 2 3 4 5 6 7 8 9 10 11 12
| echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
lsmod | grep bbr
tcp_bbr 20480 2
|
放行全部端口(重启失效)
1 2 3 4 5
| iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -F iptables-save
|
持续化规则(重启不失效)
1 2 3 4 5 6
| apt install iptables-persistent
netfilter-persistent save netfilter-persistent reload
|
1 2 3 4 5 6 7
| rm -rf /etc/iptables && reboot
或
rm -rf /etc/iptables/rules.v4 rm -rf /etc/iptables/rules.v6 reboot
|
同时你也需要进入后台配置一下入站规则,我是开放的所有协议
DD脚本,下方演示为Debian 10
1
| bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p "密码" -port "端口"
|