Debian11 服务器禁用IPv6
发表于|VPS
|总字数:46|阅读时长:1分钟
1、编辑/etc/sysctl.conf文件
1 | sudo nano /etc/sysctl.conf |
在文件末尾添加:
1 | net.ipv6.conf.all.disable_ipv6 = 1 |
保存文件后执行:
1 | sudo sysctl -p |
或
1 | sysctl -p |
文章作者: lcsoul
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 畅想生活!
相关推荐
2025-09-01
服务器没有IPv6 却解析IPv6地址 导致无法访问网站
编辑 1nano /etc/network/interfaces 粘贴 12iface eth0 inet6 static disable-ipv6 yes 重启后生效 临时: 12sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 永久生效 编辑/etc/sysctl.conf 添加: 12net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1
2025-08-26
VPS常用命令及脚本
自动同步校正系统时间12apt install systemd-timesyncdtimedatectl set-ntp true 设置时区为北京时间1timedatectl set-timezone Asia/Shanghai BBR调参脚本1wget http://sh.xdmb.xyz/tcp.sh && bash tcp.sh 一个精简的 Linux TCP/IP & BBR 参数智能优化脚本1bash <(curl -sL https://raw.githubusercontent.com/yahuisme/network-optimization/main/script.sh) 详情访问: https://github.com/yahuisme/network-optimization 科技lion脚本工具箱1bash <(curl -sL kejilion.sh) 详情访问https://kejilion.sh 一键DD/重装脚本 (One-click reinstall OS on VPS...
2025-02-07
linux挂载新硬盘
查看硬盘的使用情况,也就是哪些硬盘没有挂载 1fdisk -l 查看挂载情况 1fdisk -l 首先,使用命名 mkfs.ext4 硬盘名称 进行格式化,本例的命令如下 1mkfs.ext4 /dev/vdb 或 mkfs.ext4 /dev/sdb 然后,创建挂载目录,用来㩐载数据盘,命令如下 123# mkdir /hhd (创建目录的意思)# mount /dev/vdb /hhd (将硬盘vdb挂到目录data1下)# df -h (查看挂载情况) 系统重启自动挂载硬盘的操作方法 12# echo '/dev/vdb /hhd ext4 defaults 0 0' >> /etc/fstab (自动挂载命令,会出现确认命令,选择y)# cat /etc/fstab (查看自动挂载是不是生效了) 重启系统 reboot 查看是不是自动挂载了 df -h
2020-11-03
玩客云Armbian之安装OMV
1、修改时区 1ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo “Asia/Shanghai” > /etc/timezone 2、修改源 1vim /etc/apt/sources.list 1deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib deb-src ht...
2025-03-05
如何解决 刷pixelos后时间无法同步 WIFI显示感叹号
前置条件打开 开发者选项 设置-关于本机-连点 Build号设置-系统-开发者选项- 打开USB调试电脑使用ADB工具下载地址:Android开发者官网PixelOS下载地址1、时间同步 手机连接电脑执行: 1234//设置中国时区adb shell setprop persist.sys.timezone Asia/Shanghai//设置NTP服务器adb shell settings put global ntp_server ntp1.aliyun.com 2、WIFI感叹号 123456//删除无法使用的监测点adb shell settings delete global captive_portal_https_urladb shell settings delete global captive_portal_http_url//添加新的监测点(小米源)adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate\_204adb she...
2025-08-16
Debian使用ntp同步时间
123apt-get updateapt-get install ntpdatentpdate ntp1.aliyun.com
公告
2025-12-31 Wordpress迁移到Hexo
