Skip to content

Instantly share code, notes, and snippets.

View gilangvperdana's full-sized avatar
🎓
Still Learning

Gilang Virga Perdana gilangvperdana

🎓
Still Learning
View GitHub Profile
@gilangvperdana
gilangvperdana / README.md
Last active January 12, 2024 09:15
PowerCLI VMWare Installation

General

PowerCLI for VMware

Installation (tested on Windows10)

## Install Online (Run Powershell as Administrator)
Install-Module VMware.PowerCLI -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
 
@gilangvperdana
gilangvperdana / README.md
Created January 11, 2024 02:07
Install STUNNEL for SSH over HTTPS

General

This is workaround for install stunnel4 (SSH over HTTPS)

Command

apt install -y stunnel4

cd /etc/stunnel/
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -sha256  -subj '/CN=127.0.0.1/O=localhost/C=US'  -keyout /etc/stunnel/stunnel.pem  -out /etc/stunnel/stunnel.pem
@gilangvperdana
gilangvperdana / README.md
Last active February 23, 2024 08:21
Libvirt Client

General

If you want to see KVM/QEMU on VMHost with Libvirt client you can use libvirt-clients

Install Libvirt Clients

apt install -y libvirt-clients

Remote Command

Assume UUIDVM result from virsh list & 192.168.2.13 are Server HOST. for Remote Virsh make sure TCP port 16509 are open.

@gilangvperdana
gilangvperdana / Service KMS
Created December 18, 2023 01:07 — forked from judero01col/Service KMS
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@gilangvperdana
gilangvperdana / README.md
Last active December 8, 2023 02:49
Postman SOCKSv5 Proxy
@gilangvperdana
gilangvperdana / README.md
Created December 4, 2023 07:23
Auto Change Default GW Ubuntu Script
#!/bin/bash
# List of gateways with corresponding interfaces
gateways=("192.168.100.1" "192.168.70.1" "192.168.80.1")
interfaces=("eth0" "eth1" "eth2")
# Function to check internet connectivity using a specific interface and gateway
check_gateway_connectivity() {
interface=$1
gateway=$2
@gilangvperdana
gilangvperdana / README.md
Last active November 12, 2023 06:36
Mount NFS Directory on Windows Server 2019

General

If you want to mount your NFS Directory to Windows Server 2019 you can follow this guide.

Install NFS Client on Windows Server

Open Powershell then execute this

Import-Module ServerManager
Install-WindowsFeature -Name FS-NFS-Service
Install-WindowsFeature NFS-Client
@gilangvperdana
gilangvperdana / WSL-ssh-server.md
Created October 22, 2023 03:50 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@gilangvperdana
gilangvperdana / README.md
Created September 30, 2023 15:05
Monitoring Docker Container

General

Do you want to monitor your Docker Contianer on your VM/Server? You can use this method.

Prerequisites

  • Prometheus
  • Grafana
  • Docker

Create daemon.json

  • Create daemon.json
@gilangvperdana
gilangvperdana / python_telegram_bot_guide.md
Created September 5, 2023 09:27 — forked from tjtanjin/python_telegram_bot_guide.md
A short guide for hosting telegram bot on Ubuntu!

How to host a telegram bot on Ubuntu (18.04/20.04)

Introduction

This short guide will walk you through hosting your very own telegram bot on Ubuntu (tested on Ubuntu 18.04 and 20.04)!

Prerequisites

This guide assumes knowledge of the following:

1) Provisioning a VPS
2) Familiarity with SSH
3) Familiarity with linux command line