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 /
Created May 17, 2024 10:24
See Serial Number of Virtual Disk


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

  • UUID

Check with UUID

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


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 /
Last active April 18, 2024 05:12
Reset RDP License
gilangvperdana /
Last active March 26, 2024 05:59
Search Online Package Linux


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


apt-get --print-uris install package_name

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


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 /
Created March 10, 2024 14:47
Overwrite /etc/resolv.conf on Linux with Netplan Configuration


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


gilangvperdana /
Last active February 23, 2024 07:31
Create Mountpoint with Volume Group


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




  • 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 /
Created February 9, 2024 13:12
Auto DHCLIENT Spesific interface when Booting


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


for Example spesific interface on this workaround are ens18

  • Create this script
sudo nano /etc/init.d/dhclient-ens18
gilangvperdana /
Last active March 10, 2024 16:08
VirtualBox CLI
gilangvperdana /
Created February 8, 2024 07:22 — forked from pokev25/
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# cd src
cd /usr/local/src
curl -LO