blog.masa23.jp
Network Command Notes for Linux/FreeBSD
Personal notes on frequently used and easily forgotten network commands.
Checking Operation Linux FreeBSD Check interfaces ip link show ifconfig -l Check interfaces (including addresses) ip addr ifconfig Check interface packet counters ip -s link dev netstat -idb -I ARP table ip -4 neighbor arp -a IPv6 neighbor table ip -6 neighbor ndp -a Bridge Operation Linux FreeBSD Add interface brctl addif br0 eth0 ifconfig bridge0 addm vtnet0 Remove interface brctl delif br0 eth0 ifconfig bridge0 deletem vtnet0 Create bridge interface brctl addbr br0 ip link set up dev br0 ifconfig bridge0 create ifconfig bridge0 up Delete bridge interface ip link set down dev br0 brctl delbr br0 ifconfig bridge0 down ifconfig bridge0 destroy VLAN Operation Linux FreeBSD Create VLAN interface ip link add link eth0 name eth0.
…
2021-01-29Content Protection Using Web Accelerator
This article is the 13th entry in the Sakura Internet Advent Calendar 2020.
Content Protection Using One-Time URL When distributing content to a specific group, it often involves downloading content after password authentication.
However, when using it with a CDN, BASIC authentication might not be available, and changing the URL can result in the cache being treated as a different entity, making CDN utilization difficult.
Web Accelerator has a One-Time URL feature, which I’ll introduce for content protection.
…
2020-12-13Using Sakura Cloud Web Accelerator (CDN) with AWS S3
This content was moved from Qiita.
While it’s common to deliver images and other content with S3 + CloudFront, if the delivery target is limited to Japan, it might be cheaper to use S3 + Sakura Cloud’s CDN service, Web Accelerator. So, let’s set it up.
I haven’t verified if the actual billing will be cheaper.
The delivery fee for CloudFront is 0.140 USD (15.8 yen as of December 28, 2017) per GiB in Japan, so Web Accelerator, which costs 5 yen (including tax) per GiB, seems cheaper.
…
2018-12-28Ubuntu 18.04 Configuration Notes
This content was moved from Qiita.
Configuration Notes for Ubuntu 18.04 Personal notes on changes in Ubuntu versions that caught my attention.
Changing the Hostname # hostnamectl set-hostname sv1.example.jp Setting up iptables With netplan, it doesn’t work well with if-pre-up.d? Using iptables-persistent works well.
# apt install iptables-persistent # <configure iptables> # iptables-save > /etc/iptables/rules.v4 # ip6tables-save > /etc/iptables/rules.v6 Configuring netplan Place the file in yaml format in /etc/netplan/*.yaml
network: ethernets: ens3: addresses: - 192.
…
2018-05-28Using Let's Encrypt with Sakura Cloud Web Accelerator (CDN)
This content has been moved from Qiita.
Let’s use Let’s Encrypt with Sakura Cloud Web Accelerator.
Update (2021/01/29) The Web Accelerator now has an auto-renewal feature for Let’s Encrypt, so there’s no need for the following efforts anymore! 🎉
Announcing Automatic Renewal of Let’s Encrypt Certificates on Web Accelerator Using Automatic Renewal Certificates for Let’s Encrypt on Web Accelerator Overview When using a custom domain with Sakura Cloud Web Accelerator, you can enable SSL (including HTTP2 support) by installing an SSL certificate.
…
2017-01-25No Connectivity When More Than 20 IP Addresses Are Added with keepalived
This content has been moved from Qiita.
In a certain setup, keepalived is used as a load balancer with VRRP and LVS. This load balancer is configured with numerous IP addresses (due to SSL certificates, etc.) as shown below.
I encountered a problem where the newly added IP addresses had no connectivity.
keepalived Load Balancer Configuration (DSR Configuration) IP addresses used for SSL on the VIP are routed from the router using static routes and added as needed.
…
2016-05-16Struggles with Golang Date Formatting
This content has been moved from Qiita.
To specify date formatting in Golang, you use the time.Format function. I needed to format dates for graphite-api using the following format:
However, I encountered issues where it worked on some environments but not on others, wasting a lot of time. The problem turned out to be a bug that was fixed in a Golang version update.
Specifying the Format Specified format: HH:SS_YYYYMMDD So in Golang: Format("15:04_20060102") Test Code package main import ( "fmt" "time" ) func main() { now := time.
…
2016-05-16Relaxing Max Open Files for Specific Daemons with systemd
This content has been moved from Qiita.
There are times when you want to relax the Max open files setting for services like nginx.
Prior to CentOS7, which did not use systemd, we had to modify limits.conf. However, with systemd, the process is simpler.
Let’s assume we’re having trouble with nginx.
Checking the Current Settings # grep "^Max open files" /proc/`cat /var/run/nginx.pid`/limits Max open files 1024 4096 files Currently, the hard limit is 4096, meaning that a single process cannot open more than 4096 files.
…
2016-04-02Setting Up Vim for Writing Golang
This content has been moved from Qiita.
When coding in Go using Vim, you can make coding easier with syntax highlighting and tools like gofmt and goimports. However, I found various articles on this topic to be complex, so I decided to compile my own simplified guide.
Installing Golang OS X $ brew install golang CentOS $ sudo yum install golang --enablerepo=epel Ubuntu $ sudo apt install golang Creating a Directory for GOPATH $ mkdir $HOME/go Setting Environment Variables in .
…
2016-03-14NEC UNIVERGE IX 2010 Firmware Update
This guide briefly describes how to update the firmware.
Ensure you can retrieve the firmware from a tftp server beforehand.
Check the current version Router(config)# show version NEC Portable Internetwork Core Operating System Software IX Series IX2010 (DS) Software, Version 5.1.18, RELEASE SOFTWARE Compiled Jul 18-Fri-2003 13:32:49 JST #2, coregen-5.1 ROM: System Bootstrap, Version 5.5 System Diagnostic, Version 4.3 uptime is 1 minute System image file is "ix2010-ds-5.1.18.ldc" IX2010 (MPC8250) processor with 57344K bytes of memory.
…
2009-10-20