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 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
@gilangvperdana
gilangvperdana / appsec.yaml
Created September 5, 2023 09:25
Example Manifest with Istio
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-minio-config
data:
default.conf: |
server {
listen 80;
listen [::]:80;
server_name localhost;
@gilangvperdana
gilangvperdana / AddFail2Ban.md
Last active May 25, 2024 13:58
Proxmox Playground

General

If you want to protect your auth Proxmox VE, you can follow this step.

Brief

This configuration will be make max 3 attempt for Login to SSH or GUI & ban for 1 days you can modify on maxretry & bantime parameter.

Install Fail2ban

apt-get install -y fail2ban
@gilangvperdana
gilangvperdana / echo-server.yaml
Created August 3, 2023 05:05 — forked from chanjarster/echo-server.yaml
istio gateway behind nginx with SSL termination
apiVersion: v1
kind: Namespace
metadata:
name: istio-test
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Service
metadata:
@gilangvperdana
gilangvperdana / README.md
Last active July 25, 2023 09:14
Kubectl Installation on Windows

Kubectl

the Kubernetes-specific command line tool that lets you communicate and control Kubernetes clusters

Download Package from CURL (Terminal)

curl.exe -LO "https://dl.k8s.io/release/v1.27.3/bin/windows/amd64/kubectl.exe"

Create Env Variable

  • Assume we put config file on C:\kubectl\.kube\config
@gilangvperdana
gilangvperdana / README.md
Last active July 28, 2023 18:02
Kubeadm 2 Nodes All Role

Prerequisites

  • 2x Ubuntu 20.04LTS
  • 2 VCPU
  • 2GB RAM
  • 50GB Storage

Assume

  • Assume node1 have IP -> 10.10.10.247

Update & Install Package

@gilangvperdana
gilangvperdana / README.md
Created July 16, 2023 17:26
Upgrade Linux Kernel

General

  • Tested on Ubuntu 20.04 Server LTS from 5.4 to 6.4

Upgrade

uname -r

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
sudo install ubuntu-mainline-kernel.sh /usr/local/bin/