How to use go-sockaddr template to define IP address
Use go-sockaddr template to define IP address inside Consul configuration. Play with go-sockaddr Install the Go programming language. $ sudo apt install golang-go Install go-sockaddr. $ go install...
View ArticleHow to immediately drop incoming and outgoing packets using Dynamic Firewall...
Enable panic mode to immediately drop incoming and outgoing packets using Dynamic Firewall Manager. Query panic mode. $ sudo firewall-cmd --query-panic no $ echo $? 1 Enable panic mode. $ sudo...
View ArticleHow to display hardware information
Display hardware information. Commands described here demonstrate how to list hardware, PCI/USB/block devices, and DMI table. List hardware List hardware paths including numeric IDs. $ sudo lshw -short...
View ArticleHow to determine maximum memory capacity
Determine maximum memory capacity. Use a dmidecode utility to decode SMBIOS table contents related to the memory and display using a human-readable format. $ sudo dmidecode --type memory # dmidecode...
View ArticleHow to secure Consul communication
Secure Consul communication. Generate encryption key Generate encryption key that will be used to encrypt gossip protocol. $ consul keygen wZHOCKakzCeAesu7HK07tqmc3PwJojN/jNfbXEDqplI= Generate...
View ArticleHow to control Power Profiles daemon using command-line
Control Power Profiles daemon using a dedicated powerprofilesctl command-line utility. Permanently change the power profile Display version of the Power Profiles command-line utility. $...
View ArticleHow to access service socket as a regular user
Create an exception for a regular user to access service socket using systemd. I will use HAProxy to show the standard group based technique and the systemd/ACLs approach. Prerequisites Create a...
View ArticleHow to scan wireless networks
Scan wireless networks. Use iwlist utility to scan wireless networks. $ sudo iwlist wlan0 scanning wlan0 Scan completed : Cell 01 - Address: 00:78:CD:91:BA:30 Channel:6 Frequency:2.437 GHz (Channel 6)...
View ArticleHow to block IP address using Dynamic Firewall Manager
Block IP address using Dynamic Firewall Manager. Use drop zone to block a network subnet. $ sudo firewall-cmd --zone=drop --add-source=192.168.0.0/16 success Use drop zone to block multiple IP...
View ArticleHow to configure cursor size using command-line utility
Configure cursor size using command-line on Ubuntu 22 Jammy Jellyfish. You can configure cursor size using GNOME control center. Get current cursor size using GSettings configuration tool. $ gsettings...
View ArticleHow to parse and filter dpkg database
Parse and filter dpkg database to display selected fields or other specific information. Install Gawk script to parse dpkg databases. $ sudo apt install dpkg-awk Display package information. $ dpkg-awk...
View ArticleHow to configure Consul Access Control Lists
Configure Consul Access Control Lists. Inspect current server configuration. $ sudo -u consul cat /etc/consul.d/consul.hcl # datacenter datacenter = "dc-lab-1" # data directory data_dir = "/opt/consul"...
View ArticleHow to display currently connected wireless network
Display the name of the wireless network you are connected to. iwgetid Use iwgetid utility to display currently connected wireless network. $ iwgetid wlan0 ESSID:"Searching..." Display the name of the...
View ArticleHow to lookup specific element in Ansible dictionary or list of these
Lookup specific element in Ansible dictionary or list of these. Sample playbook to look for elements from elements_to_look_for in first_variable, second_variable and third_variable. $ cat playbook.yml...
View ArticleHow to configure Unbound DNS validating resolver
Configure Unbound DNS validating resolver. Determine device address. $ ip --brief address show eth0 eth0 UP 172.16.151.254/21 Update package index. $ apt update Upgrade packages. $ apt upgrade Install...
View ArticleHow to instruct consul to disable automatic checking for updates
Instruct consul to disable automatic checking for updates. I am using Consul inside an isolated network, so it cannot connect to the world. $ journalctl -u consul -f [...] Jul 17 18:55:15 jammy...
View ArticleHow to inspect vault configuration
Inspect vault configuration to troubleshoot potential problems. Use diagnose subcommand from operator command group to analyze current configuration. $ sudo -u vault vault operator diagnose -config...
View ArticleHow to display active but disabled systemd services
Display active but disabled systemd services. Use the following script to display active but disabled services. $ while read -r line; do unit=$(echo $line | awk '{print $1}') if [ "$(systemctl...
View ArticleHow to install HasiCorp Vault
Install and configure HashiCorp Vault. Install Consul application Create consul cluster, configure encryption and access control lists. Create access control lists and tokens Define policy for Vault...
View ArticleHow to configure OpenSSH server to use legacy public key algorithm to...
Configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client. Operating system version. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu...
View Article