🧩 ZetoLog

👋 Welcome to my blog site!

  • Writing, coding, and living at my own pace.
  • 写作、编程、以自己的节奏生活。
  • A quiet corner of the web for ideas and growth.
  • 在这片安静的网络角落,记录思想与成长。

Risk control script to prevent RDP brute-force attacks

Today, my Windows server account was automatically locked due to a series of login failures (Event ID 4740), preventing me from logging in normally. I urgently checked the firewall rules and found that manually blocking these IPs was too late, and the frequent account lockouts were impacting normal business operations. Overview This script is primarily used to automatically detect IPs that fail to log in via RDP. When the number of failed attempts by the same IP exceeds a threshold within a set time window, its access will be automatically blocked. It can also detect account lockout events (4740) and attempt to unlock locked accounts, reducing manual intervention. ...

November 13, 2025 · 11 min · ZetoHkr

How to easily use Kqueue in C language

This tutorial is designed for macOS or BSD systems. What is kqueue? kqueue is an event notification mechanism in macOS (and BSD systems such as FreeBSD). If you are writing a server, but you don’t want to allocate a thread for each client; you can use kqueue to listen for events from clients, for example: Who just connected? Who disconnected? Which client has sent a message? The system notifies you automatically. Multiple clients can be served by a single thread. This is I/O Multiplexing. kqueue is similar to epoll in Linux and iocp in Windows. This will save resources. ...

November 2, 2025 · 14 min · ZetoHkr

How to Deploy OpenWrt in Proxmox VE (Step-by-Step Guide)

Prerequisite A dedicated server (Pre-installed PVE) Public IP address (Optional, but you must be able to access the server) Internet Getting Started 🚀 Download OpenWrt image file cd /var/lib/vz/template/iso wget https://downloads.openwrt.org/releases/24.10.3/targets/x86/64/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz gunzip openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz You can select other versions and architectures. Click Here Create an empty virtual machine OS tab: Select Do not use any media System tab: BIOS: SeaBIOS Other optional: custom Disks tab: Delete all disk CPU: Select Advanced and set CPU units value is 1024 (Optional) Other optional: custom Memory tab: custom Network tab: Bridge: Select a bridge that can access the Internet Other optional: custom Finish Import image to virtual machine Import image # 101 is your vm id # local is your storage name qm importdisk 101 /var/lib/vz/template/iso/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img local Double click imported disk in vm hardware menu Bus/Device: Select SATA Other optional: custom Set vm boot order and add a network interface card Navigate to the vm Options menu Double click Boot Order option, and only select just imported disk, and click OK button Back to Hardware menu Click Add button and select Network Device item in dropdown Bridge: Select a bridge [See Tips] Other optional: custom Tips: Can remain in the same VNet as the first NIC, but only allow one gateway (Subnet or OpenWrt) with DHCP enabled ...

October 22, 2025 · 2 min · ZetoHkr

How to deploy PVE in cloud dedicated server

Prerequisite A dedicated server. (Pre-installed PVE) Public IP address (Optional, but you must be able to access the server) Some virtual machine (You can install these vms later.) Getting Started 🚀 Configure to SDN (Software-Defined Network) Navigate to the Datacenter menu. Expand the SDN menu in center menu. Select the Zones menu under the SDN menu. Add a simple zone. ID: for example “sdn01” MTU: auto Nodes: All (No restrictions) IPAM: pve DNS Server: (Keep empty) Reverse DNS Server: (Keep empty) DNS Zone: (Keep empty) automatic DHCP: (Keep empty, or if you need DHCP.) Create a VNets Name: for example “vnet1” Alias: (allow empty) Zone: (Just created) Isolate Ports: (Keep empty) VLAN Aware: (Keep empty) Create a Subnets Select just created VNet Click create button General Subnet: for example “10.0.0.0/24” Gateway: for example “10.0.0.1” Select SNAT If you need DHCP (DHCP Ranges) Click Add button Start Address: 10.0.0.10 End Address: 10.0.0.100 Create some virtual machines Network option need to select vnet1 (just created SDN name) in bridge option. ...

October 20, 2025 · 4 min · ZetoHkr

How to deploy Hugo with Docker

Prerequisite Linux Server Public IP address (Optional) Docker & Docker compose Docker images mirror or proxy Git (Install Hugo themes need to use Git) (Optional) Getting Started 🚀 Create a Hugo root directory. E.g.: /opt/hugo mkdir /opt/hugo cd /opt/hugo Pull Hugo docker image. (Unofficial, but recommend.) docker pull hugomods/hugo:debian-non-root-0.151.2 # or use docker images mirror. "docker.z5r.org" is myself mirror site. You also use other mirror site. docker pull docker.z5r.org/hugomods/hugo:debian-non-root-0.151.2 Initial Hugo project. You can remove this docker container at later. ...

October 19, 2025 · 3 min · ZetoHkr