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 September 17, 2024 01:49
Add Routing Private Network OpenVPN CLI

General

If you want to add routing to Private Network like Pritunl Server, you can follow this step for OpenVPN CLI

Edit server.conf

Assume 192.168.10.0/24 are network we want to reach from OpenVPN Client

nano /etc/openvpn/server.conf
push route "192.168.10.0 255.255.255.0"
@gilangvperdana
gilangvperdana / README.md
Created August 20, 2024 12:19
Integrate Cinder with iSCSI (TrueNAS)

General

I have a TrueNAS node & i want to integrate it with Cinder. How to? here we go.

Pre-requirement

  • Openstack Cluster with Cinder Enabled (i use Kolla Ansible for Deployer)
  • TrueNAS with Pool & Dataset allocation

Enable Cinder with ISCSI Backend

nano /etc/kolla/globals.yaml
@gilangvperdana
gilangvperdana / CEPH
Last active August 20, 2024 09:34
CLI
ceph health detail
ceph -s
ceph tell osd.* config get osd_max_backfills
ceph tell osd.* config get osd_max_backfills 2
ceph tell osd.* config get osd_recovery_max_active
ceph tell osd.* config set osd_recovery_max_active 4
ceph pg deep-scrub $numberpg
@gilangvperdana
gilangvperdana / README.md
Last active August 5, 2024 12:43
Ceph References

Installation with Cephadm

apt update -y && apt-get full-upgrade -y
apt install cephadm

 cephadm add-repo --release quincy
 cephadm install
 cephadm install  ceph-common
@gilangvperdana
gilangvperdana / README.md
Last active August 9, 2024 19:39
Integrate Logging with Promtail & Loki

General

Hello world, in this topic actually I'm making a logging visualization in grafana for GeoIP purposes. As we know, GeoIP cannot use Prometheus, we have to use metrics in the form of raw logs, which is called logging. Because I don't have a lot of resources for running the ELK Stack, in the end I just ran logging with Promtail + Loki. Follow this technical for installation and integration of Promtail & Loki.

I will continue from this article to visualize it with Promtail + Loki.

Change nginx.conf

	log_format json_analytics escape=json '{'
						'"msec": "$msec", ' # request unixtime in seconds with a milliseconds resolution
						'"connection": "$connection", ' # connection serial number
@gilangvperdana
gilangvperdana / README.md
Created July 5, 2024 11:23
Fix OpenSSH Denied with Pubkey on Windows Server

General

Have you ever wanted to change SSH authentication on your Windows server with a public key and it failed after setting it? let's follow this step

Create authorized_keys

cd C:\Users\Administrator\.ssh
ssh-keygen
type id_rsa.pub > authorized_keys
@gilangvperdana
gilangvperdana / README.md
Last active June 17, 2024 08:31
Deploy Openstack Caracal Single Node on Ubuntu Jammy with Kolla Ansible

General

I just want to deploy an Openstack Caracal Version (you can follow the update of Openstack Release on here) on my Ubuntu Jammy as LAB. I do on VirtualBox. You can see my previous article here, i just deploy Openstack Xena on Ubuntu Focal in Cloud/VM.

Goals

  • I want to deploy single node with all role of Openstack (Management & Compute) Caracal on branch Master on top of Ubuntu Jammy (22.04LTS) on VirtualBox
  • I want to access with FQDN os.test.link for External & osint.test.link for Internal FQDN
  • I want to use secondary Disk for VM Volumes (Cinder)
  • I want to makesure all service call with TLS
@gilangvperdana
gilangvperdana / README.md
Last active June 8, 2024 16:49
Test Port Lisen on Linux & Windows

General

If you want to test connection (port listen) to another server you can use netcat. On linux will be ncat command & on windows will be ncat command.

Linux

  • Installation
apt install -y netcat
  • Usage
@gilangvperdana
gilangvperdana / README.md
Last active June 2, 2024 01:39
See Serial Number of Virtual Disk

General

Have you ever confused about virtual disk with same size? then you can't choose who the right one? you can check with :

  • SCSI ID
  • UUID

Check with UUID

  • Windows
wmic diskdrive where index=0 get serialnumber
@gilangvperdana
gilangvperdana / README.md
Last active May 9, 2024 06:15
Port Forwarding with Windows Server

General

If you want to port forwarding use windows server, you can use netsh command. for now it's compatible just for TCP (not UDP).

Show existing rule

netsh interface portproxy show all

Delete Existing Configuration