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 February 9, 2024 18:58
DNS Server with BIND9

Installation DNS Server with BIND9

Environment

Ubuntu 20.04 Server LTS
BIND9

Node Description

@gilangvperdana
gilangvperdana / README.md
Last active October 27, 2023 10:12
Kubernetes with KubeSpray on BareMetal Ubuntu Server 20.04 LTS

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 February 9, 2024 14:31
Expose your Local VM with VPN

Expose your local VM with VPN

If you want to have an Public IP address, you can have two technique :

  • Reserved Public IP (High Cost)
  • Reserved public VPS (Lower Cost)

Markdown :

  • This Markdown will be sharing about Reserved public VPS Technique to have an Public IP on our Local VM.
  • This tutorial will make public ip on public vps that points to local VM.

Environment

@gilangvperdana
gilangvperdana / README.md
Last active July 14, 2022 15:50
Multi Proxy Nginx with 443 Redirect and Hostname

Multi Proxy Pass Endpoint with One Domain on Nginx

This tutorial is suitable for you if you want to access some apps with one domain, just different path /

Goals

  • You can access on localhost to access localhost:5000
  • You can access on localhost/nodejs to access localhost:3000

Configuration

nano /etc/nginx/sites-enabled/default
@gilangvperdana
gilangvperdana / README.md
Last active February 6, 2024 11:55
Multi Port Nginx Block

Multi Port Reverse Proxy on Nginx Configuration

This tutorial are suitable for you if you want to reverse multi endpoint with one domain different port.

Goals

  • You can access on localhost:8443 to access localhost:9200
  • You can access on localhost:8442 to access localhost:5601

Configuration

nano /etc/nginx/sites-enabled/default
@gilangvperdana
gilangvperdana / README.md
Last active May 6, 2022 03:13
Expose Nginx Ingress with specify HOST Header on K8s on-prem with OpenVPN

Expose Nginx Ingress on K8s with OpenVPN

Expose to world your Apps on K8s On-Premises with Nginx Ingress + Metallb + OpenVPN

Goals

  • You can access your apps with Ingress URL on your K8s on-prem to the World!

Markdown

  • 192.168.17.50 are Nginx Ingress External IP Generated by MetalLB.
  • res.bignetlab.com are Domain for this case.
  • This default.conf are Nginx on Host (not on K8s stack).
@gilangvperdana
gilangvperdana / README.md
Last active May 5, 2022 06:40
Speedtest & Check Public IP on Linux CLI

Check Public IP on Linux CLI

curl ifconfig.me
curl -4/-6 icanhazip.com
curl ipinfo.io/ip
curl api.ipify.org
curl checkip.dyndns.org
dig +short myip.opendns.com @resolver1.opendns.com
host myip.opendns.com resolver1.opendns.com
curl ident.me
@gilangvperdana
gilangvperdana / README.md
Last active May 18, 2022 09:41
OpenStack Horizon over TLS

Make Horizon Dashboard over TLS

Configuration

  • Generate Certificate with OpenSSL
apt install -y apache2
apt install -y openssl

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout horizon.key -out horizon.crt
mv horizon.crt /etc/ssl/certs/
@gilangvperdana
gilangvperdana / BlockPortfromOutside.md
Last active November 29, 2023 02:44
Node Exporter + Prometheus + Grafana Provisioning

General

If you want to block port node exporter access from outside you can use this command

iptables -A INPUT -p tcp -s 10.7.0.0/24 --dport 9100 -j ACCEPT
iptables -A INPUT -p tcp -s localhost --dport 9100 -j ACCEPT
iptables -A INPUT -p tcp --dport 9100 -j DROP
  • 10.7.0.0/24 & localhost are IP ALLOWED to access port 9100
@gilangvperdana
gilangvperdana / README.md
Last active May 19, 2022 02:26
Expose Grafana with Nginx Reverse Proxy

Expose Grafana with Nginx Reverse Proxy

This documentation tested on Ubuntu 20.04 Server LTS.

Goals

  • Make grafana can accessed to world with stack.bignetlab.com/grafana
  • Expose with Nginx Reverse Proxy Technique.

Make Sure

  • Make sure you have a Public IP.
    • You can try to use a VPN