Skip to content

Instantly share code, notes, and snippets.

Avatar
🎓
Still Learning

Gilang Virga Perdana gilangvperdana

🎓
Still Learning
View GitHub Profile
@gilangvperdana
gilangvperdana / README.md
Last active May 28, 2023 16:09
Generate Wild Card TLS Certificate Cloudflare DNS Management
View README.md

General

This tutorial tested on Ubuntu Server 20.04 with Cloudflare for DNS Management.

Prerequisites

  • Make sure you have generated API Token with specific zone and DNS read & write permission.

Create cloudflare.ini

nano /root/cf/cloudflare.ini
@gilangvperdana
gilangvperdana / ping.php
Last active May 27, 2023 12:04
Monitor an Endpoint on Telegram
View ping.php
<?php
// Config information
$server = "IP/DOMAINWHOTOMONITOR"; // the address to test, without the "http://"
$port = "PORT";
// Telegram Bot API configuration
$telegramToken = 'YOURTELEGRAMTOKEN';
$chatId = 'YOURTELEGRAMCHATID';
@gilangvperdana
gilangvperdana / dnscheck.sh
Created May 15, 2023 04:53
Notify New/Deleted DNS Record to Telegram on Cloudflare with Cloudflare API
View dnscheck.sh
#!/bin/bash
# Token bot Telegram dan chat ID penerima notifikasi
TOKEN="YOUR_BOT_TOKEN"
CHAT_ID="YOUR_TELEGRAM_CHAT_ID"
# Fungsi untuk mengirim notifikasi ke Telegram
function send_telegram_notification {
MESSAGE="$1"
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
@gilangvperdana
gilangvperdana / README.md
Last active May 11, 2023 17:34
Cloudflare API
View README.md

General

If you need a shortcut or want to develop operational features on Cloudflare, you can take advantage of the Cloudflare API that I have tried (only core functions) with references like my notes.

DNS

CREATE A NEW RECORD

#!/bin/sh
   
EMAIL="yourCF@email.com"; \
KEY="YOURCDAPIKEY"; \
@gilangvperdana
gilangvperdana / README.md
Last active May 8, 2023 16:33
PPTP (Point to Point Tunneling Protocol Virtual)
View README.md

Mikrotik PPTP Server Creates

  • Aktifkan fitur PPTP VPN Server Mikrotik. Masuk ke menu PPP --> Pada Tab Interface --> Klik PPTP Server --> Centang kotak Enabled --> OK
  • Selanjutnya kita buat User PPTP VPN nya. Masuk ke tab Secret --> Klik Tombol + --> Isikan Data Sebegai Berikut :
    • Name : Username PPTP VPN nya
    • Password : Password PPTP VPN nya
    • Service : Pilih service yang digunakan, bisa pilih pptp atau pilih any saja.
    • Profile : Pilih profile yang akan digunakan, pilih default-encryption saja.
    • Local Address : IP Address yang akan digunakan oleh PPTP VPN Server
    • Remote Address : IP Address yang akan diberikan kepada PPTP VPN Client
@gilangvperdana
gilangvperdana / README.md
Last active May 6, 2023 05:11
Kubernetes with KubeSpray on BareMetal Ubuntu Server 20.04 LTS
View README.md

Kubernetes with KubeSpray on BareMetal Ubuntu Server 20.04 LTS

Provisioning Kubernetes Cluster BareMetal with KubeSpray

Environment

2x Ubuntu Server 20.04LTS
@gilangvperdana
gilangvperdana / README.md
Last active May 2, 2023 03:16
Cloudflare Tunnel
View README.md

General

  • Cloudflare build a Zero Trust feature for free to reverse our application (HTTP, TCP, SSH, etc) on-premise to Internet.
  • If you want to try this feature, at least you have a domain and manage it on Cloudflare then go to https://one.dash.cloudflare.com/

SSH

  • Assume you have point your server with agent
  • Assume domain is ssh.endpoint.com
  • For client, we must have an cloudflared tools, we can download from https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation/
    • Assume we put cloudflared on /usr/local/bin/ for linux
    • Assume we put cloudflared on D:\ for windows
@gilangvperdana
gilangvperdana / README.md
Last active April 20, 2023 06:21
Remote Ubuntu Desktop with TightVNC
View README.md

TightVNC

Make your ubuntu server to GUI Based

Installation

sudo apt install xfce4 xfce4-goodies -y 
sudo apt install tightvncserver -y 
vncserver
@gilangvperdana
gilangvperdana / README.md
Last active April 12, 2023 11:43
Installation OpenStack Xena All-in-One on Cloud with Kolla Ansible
View README.md

Installation OpenStack Xena on VM Cloud

Environment

1. Virtual Machine Ubuntu 20.04LTS (Azure, GCP, AWS, Aliyun, etc)
2. 16GB RAM
3. 512 GB Storage
4. One disk add for PV
@gilangvperdana
gilangvperdana / awsCloudFormation-app.yaml
Last active April 9, 2023 03:44
Example of AWS CloudFormation
View awsCloudFormation-app.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: >-
Application Template: Demonstrates how to reference resources from a different stack.
This template provisions an EC2 instance in a VPC Subnet provisioned in a different stack.
# This template creates:
# Amazon EC2 instance
# Security Group
######################