VyOS Hairpin NAT

So I had replaced my home router with VyOS. Set everything up and Internet can reach my servers in LAN via port-forwarding (destination NAT), all fine and dandy. Until I tried using the public domain name to access my web server from LAN. Nope, I get connection reset. 繼續閱讀

廣告

Make shift tftp server for sending / receiving firmware / config files

So got a switch that only runs HTTP & telnet interfaces and no way to transfer firmware / config via web UI. Needs to use tftp for that.

On a CentOS 7 box:

# yum install tftp-server
# /usr/sbin/in.tftpd -L -c -s /tmp

Then the switch happily copies its firmware and config using tftp. Make sure to kill the process afterward.

F2FS as rootfs for Linux Mint (and Ubuntu?)

This was tested on a ThinkPad X61s using BIOS/MBR boot by migrating an installation from a ext4 part.

  1. you’ll need an ext4 as /boot (toggle boot flag)
  2. mount f2fs at /sysimage and ext4 at /sysimage/boot
  3. rsycn everything across (I usually do this on a live image)
  4. bind (mount -B) /sys /proc /dev into /sysimage
  5. chroot into /sysimage
  6. grub-install /dev/sda
  7. update fstab for root partition path (maybe swap as well?)
  8. include the following in /etc/initramfs-tools/modules: f2fs crc32_generic libcrc32c (good idea to include lz4 and lz4_compress as well for zswap)
  9. update-grub
  10. update-initramfs

Something like that…

Mojave clock run-away

Since upgrading to Mojave, my MacBook Pro’s system clock frequently drift significantly up to 90 seconds in a few weeks. Unchecking and checking the time server option in System Preferences has no effect. The clock is only “fixed" when the MBP is rebooted.

Until Apple fixes this or I dig deeper into the issue, the clock can be set manually using the sntp command:

sudo sntp -Ss time.asia.apple.com