在 Windows 10 下忽略 TPM ,启用 Bitlocker

在虚拟机下安装 win to go 工作区的时候,由于处于虚拟环境下,bitlocker 选项是灰色的。本文介绍如何忽略 TPM 的存在而启用 bitlocker 加密。


  1. Win + R ,打开运行,输入 gpedit.msc 后回车
  2. 依次展开 Computer Configuration -> Administrative Templates -> Windows Components -> BitLocker Drive Encryption -> Operating System Drives
  3. 在右侧,双击 Require additional authentication at startup ,选择启用
  4. 勾选忽略 TPM 的复选框
  5. 确定
  6. 可以对 Removable Data Drives 进行类似的设置

Read More

VPS 只允许 Cloudflare 的 IP 访问

本文最后更新于 2024 年 2 月 25 日


本文以 Debian 10 上的 80 端口为例,介绍如何在 VPS 上只允许 Cloudflare 的 IP 地址访问,本文同样完全适用于 Ubuntu 18.04。

请先参照 Debian & Ubuntu 服务器的初始化配置 一文对服务器进行各种必要的配置。本文以 sammy 用户为例,进行规则的设置,并默认已按初始化配置文章对服务器进行了配置。


编写文件

1
2
mkdir -p ~/scripts/ufw
vim ~/scripts/ufw/add.sh
~/scripts/ufw/add.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

cd ~/scripts/ufw

for ipv4 in `curl -sL https://www.cloudflare.com/ips-v4/ | tee ips-v4`
do
sudo ufw allow from $ipv4 to any port 80
done

for ipv6 in `curl -sL https://www.cloudflare.com/ips-v6/ | tee ips-v6`
do
sudo ufw allow from $ipv6 to any port 80
done

Read More

定时重启 systemd 的服务

本文最后更新于 2019 年 9 月 18 日


本文以 Ubuntu 18.04 为例,介绍如何在 Linux 下使 systemd 服务定时重启。有几种不同的方法。


crontab

注意,此种方法在 root 用户下使用最佳,普通用户的 --user 服务会有许多问题需要解决。

1
vim cronjob
cronjob
1
30 3 * * * /bin/systemctl restart your_service
1
crontab -l cronjob

Read More

卸载阿里云主机后台监控程序

本文以阿里云的 Debian 9 系统为例,介绍如何卸载阿里云安全监控程序,本文同样完全适用于其他 Linux 系统。


卸载

1
2
3
wget http://update.aegis.aliyun.com/download/uninstall.sh
chmod +x uninstall.sh
sudo ./uninstall.sh
1
2
3
wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
chmod +x quartz_uninstall.sh
sudo ./quartz_uninstall.sh

Read More

Debian & Ubuntu 上部署 V2Ray 服务端(VMess)

本文最后更新于 2020 年 4 月 30 日


本文以 Debian 10 为例,介绍如何部署使用 VMess 协议的 V2Ray 服务端,并说明对应的客户端文件的格式,本文同样完全适用于 Ubuntu 18.04 系统。

注:请先参照 Debian & Ubuntu 服务器的初始化配置 一文对服务器进行各种必要的配置。本文以 sammy 用户为例,进行 V2Ray 的部署,并默认已按初始化配置文章对服务器进行了配置。


准备

  • 可用的公网 IP 服务器(例如在 BandwagonHostVultr 等处购买的 VPS)
  • 基础 Linux 操作知识,并了解 vim 编辑器的基本使用方法

编写简易脚本:

1
2
mkdir -p ~/scripts
vim ~/scripts/v2ray.sh

添加如下内容:

~/scripts/v2ray.sh
1
2
3
4
cd ~/scripts
wget https://install.direct/go.sh
sudo bash go.sh
rm -f go.sh*

安装

1
2
sudo chmod -R 400 ~/scripts && chmod 700 ~/scripts
bash ~/scripts/v2ray.sh

Read More

Mastodon