Quantcast
Channel: sleeplessbeastie's notes
Browsing all 770 articles
Browse latest View live
↧

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 Article


How 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 Article


How 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 Article

How 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 Article

How 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 Article


How 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 Article

How 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 Article

How 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 Article


How 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 Article


How 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 Article

How 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 Article

How 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 Article

How 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 Article


How 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 Article

How 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 Article


How 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 Article

How 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 Article


How 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 Article

How 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 Article

How 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
Browsing all 770 articles
Browse latest View live