Personal Notes-2
This is my second personal note. As the title suggests, these are my own personal notes (personal-oriented) to record some knowledge points I encounter in my daily life that need to be recorded.
All content will not be explained in detail, only operations are provided. If needed, please read by yourself. The content in personal notes is generally fragmented and messy, so please bear with me.
systemd-timesyncd Synchronizing Server Time
Installation
apt purge ntp chrony
apt update
apt install systemd-timesyncd
Configuration
nano /etc/systemd/timesyncd.conf
[Time]
NTP=time.cloudflare.com time.apple.com time.windows.com
(If your machine is located in Mainland China)
[Time]
NTP=ntp.ntsc.ac.cn ntp.aliyun.com ntp.tencent.com
Restart the service
systemctl restart systemd-timesyncd
Set RTC to UTC
timedatectl set-local-rtc 0
Set the server to UTC+8
timedatectl set-timezone Asia/Shanghai
Check the running status
timedatectl
Quickly Set Up socks5 with Docker
For Docker installation, you can jump to: Detailed process and basic commands for installing Docker on Linux
Alternatively:
curl -fsSL https://get.docker.com | bash -s docker
Pull and run the image
docker run -d --name socks5 --restart=unless-stopped -p <PROXY_PORT>:1080 -e PROXY_USER=\"<PROXY_USER>\" -e PROXY_PASSWORD=\"<PROXY_PASSWORD>\" serjs/go-socks5-proxy
<PROXY_PORT> is the external access port
<PROXY_USER> is the connection username
<PROXY_PASSWORD> is the connection password (set it long, recommended at least 16 characters with a mix of numbers and upper/lower case letters)
Realm Port Forwarding
Download the file
wget -O realm.tar.gz https://github.com/zhboner/realm/releases/download/v2.9.3/realm-x86_64-unknown-linux-gnu.tar.gz
Extract and grant execute permission
tar -xvf realm.tar.gz
chmod +x realm
mv realm /usr/local/bin/
Create the configuration file
mkdir -p /etc/realm
nano /etc/realm/config.toml
Write the configuration file
[network]
no_tcp = false # 是否关闭 TCP
use_udp = true # 是否开启 UDP
[[endpoints]]
listen = \"0.0.0.0:22\" # 中转监听端口
remote = \"1.1.1.1:22\" # 目标服务器 IP:端口
[[endpoints]]
listen = \"0.0.0.0:3389\" # 中转监听端口
remote = \"3.3.3.3:3389\" # 目标服务器 IP:端口
...