本文距离上次更新已过去 0 天,部分内容可能已经过时,请注意甄别。
之前通过 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 2 3 4 5 6
| bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a -firmware -p <password> -port <port>
|
DD 后添加 ipv6 方法
1 2 3 4 5
|
iface <设备名> inet6 dhcp
|