Wednesday 12 October 2022

Show server hardware "Product Name" and "Serial Number" from shell

Just secure shell to server and run this command as a root permission

sudo dmidecode | egrep -i 'manufacturer|product|Serial'

The result will show information such as Manufacturer,  Product Name, Serial Number, etc.

Manufacturer: Dell Inc.

Product Name: PowerEdge R430

Serial Number: xxxxxx

Manufacturer: Dell Inc.

Product Name: zzzz

Serial Number: .xxx.yyy.

Manufacturer: Dell Inc.

Serial Number: xxxx

Sunday 22 May 2022

อย่าลืมปิด Multicast Snooping บน Bridge Interface ถ้าจะติดตั้ง KVM โดยเชื่อมต่อเครือข่ายผ่าน Bridge เพราะอาจะมีปัญหาการใช้งาน IPv6 ของ Guest OS

โดยปกติการติดตั้ง Virtural Machine บน Linux OS หรือ KVM รอบรับใช้งานเครือข่ายระดับ Layer 2 ของ Guest OS ผ่าน Bridge ของ Linux Kernel ซึ่ง Bridge บน Host OS ทำหน้าที่เป็น Switch เชื่อมต่อ Guest OS กับเครือข่าย โดยมี Physical Interface บน Host OS ทำหน้าที่เป็น Uplink port ของ Switch 

แต่เนื่องจาก Bridge ของ Linux มีการเปิด Multicast Snooping เป็นค่าเริ่มต้น โดยนี้จะปิดกั้นการส่ง Multicast บางประเภทไม่ให้ส่งข้าม Bridge ซึ่งฟีเจอร์ Multicast Snooping อาจจะทำให้เครื่อง Guest OS ไม่สามารถเชื่อมต่อกับเครือข่ายผ่าน Bridge ด้วย IPv6 ได้ เนื่องจาก Multicast Snooping ไปปิดกั้นแพคเก็ตของ Neightbor Discovry Protocol (ND) ทำให้ไม่สามารถค้นหาเครื่องที่อยู่อีกฝากของเครือข่ายได้

ดังนั้นเพื่อป้องกันปัญหาได้กลาวมาข้างต้นนั้น จำเป็นต้องปิด Multicast Snooping ด้วยคำสั่งดังนี้

echo -n 0 > /sys/class/net/<brif>/bridge/multicast_snooping


Source : https://askubuntu.com/questions/460405/ipv6-does-not-work-over-bridge


Import SSH Private Key to Yubikey (PIV) for SSH Authentication

Introduction: This guide will walk you through the process of importing your SSH private key to a Yubikey (PIV) for SSH authentication on y...