Skip to content

Instantly share code, notes, and snippets.

View anubhavg-icpl's full-sized avatar

Anubhav Gain anubhavg-icpl

View GitHub Profile
@anubhavg-icpl
anubhavg-icpl / cert_gen.sh
Created November 24, 2024 08:21
A certficate generator for communication can be use for internal.
#!/bin/bash
# create-ca.sh - Script to create a Certificate Authority and generate certificates
# Create directory structure
mkdir -p ca/{root-ca,intermediate-ca,certs,private,crl,csr}
chmod 700 ca/private
# Create root CA configuration file
cat > ca/root-ca.conf << EOL
[ req ]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

HashiCorp Vault and CoreDNS Setup Guide

1. Install HashiCorp Vault

First, let's install HashiCorp Vault on your system:

# Download and install Vault
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Setting up HTTPS for Local VMs with Custom Domains

This guide will walk you through setting up a system to serve your local VMs over HTTPS using custom domain names (e.g., https://xyz.local). We'll use the following components:

  1. Hypervisor (e.g., VirtualBox, VMware, or Hyper-V)
  2. CoreDNS for local DNS resolution
  3. NGINX as a reverse proxy
  4. Smallstep/certificates for certificate management

1. Set up your Hypervisor and VMs

Certainly! I understand you want to include a firewall exception for windows_exporter as well. We can modify the msiexec command to include this. Here's an updated configuration and installation process that includes the firewall exception:

collectors:
  enabled: cpu,memory,disk,logon,os,service,system,net,logfile

collector:
  logfile:

Setting up YUM/DNF Repository Management on Arch Linux

Prerequisites

  • Arch Linux system
  • sudo privileges
  • AWS account with S3 access (optional, for remote hosting)

Installation