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 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 February 23, 2024 07:31
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
@gilangvperdana
gilangvperdana / README.md
Last active March 10, 2024 16:08
VirtualBox CLI
@gilangvperdana
gilangvperdana / install-tmux.sh
Created February 8, 2024 07:22 — forked from pokev25/install-tmux.sh
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
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
@gilangvperdana
gilangvperdana / README.md
Last active March 23, 2024 14:12
Virtualize your NVIDIA

General

If you have a server then you want to virtualize your GPU card, lets follow this workaround.

Tested on

  • Windows Server 2022
  • RHEL
  • Ubuntu

Driver on VMHost

  • Make sure you have installed driver on your VMHost, you can download on nvid.nvidia.com