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 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

@gilangvperdana
gilangvperdana / README.md
Last active April 18, 2024 05:12
Reset RDP License
@gilangvperdana
gilangvperdana / README.md
Last active March 26, 2024 05:59
Search Online Package Linux

General

If you want to download offline package on your Linux you can use this command

1

apt-get --print-uris install package_name

will give you a list of urls for packages you need to download.

2

How to secure a Proxmox exposed host

When you look for tutorials on how to install Proxmox, it always stops after the initial installation - which is quite dangerous, since it leaves a Proxmox host being exposed to the internet while listening to Ports 22 and 8006.

Heck, there is not even any SSH-hardening covered - your SSH is typically set to default values, which means: Password-authentication with the root account is perfectly possible. While you can mitigate some of these things by harding SSH or by installing fail2ban (which we will do anyhow), the host still exposes ports 22 and 8006.

For a secure system, these ports (and actually, apart from one single port ANY ports) have to be disabled. The only acceptable management access to the system should either happen via a Jumpserver or - if not available - via a direct VPN-connection.

In this gist, you find all the required steps to secure your Proxmox exposed host. This gist should work for any Proxmox host with - say - Hetzner, OVH or other vendor

@gilangvperdana
gilangvperdana / README.md
Created March 10, 2024 14:47
Overwrite /etc/resolv.conf on Linux with Netplan Configuration

General

If you want to overwrite your /etc/resolv.conf configuration with Netplan configuration you can follow this step.

Remove & Link

sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

Reference

@gilangvperdana
gilangvperdana / README.md
Last active June 15, 2024 13:39
Create Mountpoint with Volume Group

General

If you want to create an mountpoint with Volume Group you can follow this step.

Topology

image

Case

  • We have 2 disk (/dev/sdb & /dev/sdc)
  • We want to combine that 2 disk to one Mountpoint (/mnt)
  • We want to dynamicly extend that disk if we have a new disk
@gilangvperdana
gilangvperdana / README.md
Created February 9, 2024 13:12
Auto DHCLIENT Spesific interface when Booting

General

If you need dhclient spesific interface every VM booting you can try this workaround

Workaround

for Example spesific interface on this workaround are ens18

  • Create this script
sudo nano /etc/init.d/dhclient-ens18