blog.masa23.jp
Bulk Adding Slack Reactions (Emojis) to Mattermost
Since Slack’s log retention period has been reduced to 90 days, making it harder to view past logs, I decided to implement Mattermost. Here’s a note on how I copied custom emojis (reactions) from Slack to Mattermost.
Extracting Reactions from Slack Initially, I planned to extract the reactions using Slack’s API, but using the Chrome extension Slack Custom Emoji Manager made it very easy to download them.
Install the Chrome extension and access https://.
…
2022-09-29Notes on Resource Limits in FreeBSD
I wasn’t very familiar with this, so I did a brief research.
To use RCTL in FreeBSD, a kernel with RACCT and RCTL enabled is required. The Generic kernel of FreeBSD 13.1 seems to have this enabled, so enable it in loader.conf.
root@freebsd13:~ # grep -E 'RACCT|RCTL' /usr/src/sys/amd64/conf/GENERIC options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits # echo "kern.racct.enable=1" >> /boot/loader.
…
2022-08-10Using Bridge Networks on Sakura Cloud
Note: This is possible, but not the intended use. Enjoy it as a fun experiment.
On Sakura Cloud, it is not possible to connect using a bridge.
Can I assign a fixed MAC address or change it to an arbitrary one?
It is presumed that packets with MAC addresses other than those of the created VM cannot leave the VM on Sakura Cloud’s switch.
Creating a bridge within a VM to connect LXD containers directly to the router + switch IP address or the switch’s local IP address for communication is not possible.
…
2022-07-07Notes on pfctl Commands
I always forget pfctl commands, so here are some notes.
Rule Related Check current rules # pfctl -s rules Add -v to see statistics # pfctl -vs rules Table Operations List tables # pfctl -s Tables Add -vv to see statistics # pfctl -vvs Tables Display IP addresses in a table # pfctl -t <table> -T show Add an IP address to a table # pfctl -t <table> -T add <IPAddress> Remove an IP address from a table # pfctl -t <table> -T delete <IPAddress> Remove all IP addresses from a table # pfctl -t <table> -T flush
…
2022-07-07Notes on Adding OpenDKIM to Postfix + DMARC
Given the strict spam filters these days, I decided to implement DKIM on my personal mail server. Here are the notes from that process.
For DMARC settings, see the update in November 2023.
August 2024 Update I have switched from OpenDKIM to arcmilter.
Changed from OpenDKIM to arcmilter and Added Support for ARC Signatures
Environment Ubuntu 20.04 OpenDKIM Installation # apt install opendkim opendkim-tools Create the directory to store keys # install -d /etc/opendkim/key # cd !
…
2022-05-20Notes on Ubuntu 22.04
Upon upgrading to Ubuntu 22.04, it seems that the way to specify gateway4 and gateway6 in netplan has been deprecated.
Error Messages `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. `gateway6` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. Before Fix network: ethernets: ens3: addresses: - 192.168.0.2/24 gateway4: 192.168.0.1 nameservers: addresses: - 8.
…
2022-04-28Configuring Wireguard with netplan
Here’s a note on setting up Wireguard using netplan. I couldn’t find many Japanese articles on this topic.
Tested on Ubuntu 20.04.
Server Side Generating private and public keys # umask 077 # wg genkey | tee private.key | wg pubkey > public.key netplan configuration network: tunnels: wg0: mode: wireguard key: <Generated private.key> port: 50000 # UDP port number to listen on addresses: [ 192.168.2.1/30 ] # IP address for wg0 peers: - allowed-ips: [0.
…
2021-04-29Publishing a Website with Web Accelerator and Object Storage
I tried using the newly integrated feature that allows linking Sakura Cloud’s Web Accelerator with Object Storage.
Web Accelerator Now Supports Object Storage Integration
This blog is a static site generated by Hugo, so I wanted to distribute this site using Object Storage and Web Accelerator.
Currently, it is being distributed via Web Accelerator + Sakura Rental Server.
Creating a Bucket in Object Storage For pricing information, please check here
…
2021-04-15Splitting Logs Every Hour with logrotate and Compressing with zstd
I will leave a note about when I wanted to split nginx logs every hour while compressing them with zstd using logrotate.
Overview Simply putting the settings in /etc/logrotate.conf or /etc/logrotate.d/ will basically execute it with the daily CRON of /etc/cron.daily/logrotate.
This time, since I want to rotate logs every hour, I prepared a separate logrotate setting and made it run using the timer function of systemd.
Enabling zstd # apt install zstd Zstandard Wikipedia logrotate I will create /etc/logrotate-nginx.
…
2021-03-29Installed an Outlet in the Storage Room
A while ago, during the Golden Week due to COVID-19, I did a DIY project to add an outlet in the storage room.
Note that I have a second-class electrical worker license.
I heard that SNS might get chaotic if I don’t properly mention this, so just in case
Necessary Items Item Purchase Link Embedded Outlet Amazon Rakuten Gypsum Board Clamps Amazon Rakuten Gypsum Board Saw Amazon Rakuten VVF Cable Amazon Rakuten Drill for making holes in the wall (electric or manual) Screwdriver (electric or manual) Securing the Power Source Since there is an outlet directly behind the place where I want to install the outlet in the storage room,
…
2021-03-02