Setup Haproxy Dan Keepalived Di Debian 10
31 Januari 2021
Untuk membuat HA HAProxy on premise, aku pakai Keepalived. Keepalived disini berperan sebagai penjaga Floating IP, untuk fail over ketika master0 mati maka keepalived akan assign floating ip ke master1 atau master2. Lab Setup Pakai 3 node, masing-masing kuberi nama master0, master1, dan master2 Network Subnet: 10.179.72.0/24 Floating IP: 10.179.72.200/24 master0 IP Address: 10.179.72.245/24 master1 IP Address: 10.179.72.211/24 master2 IP Address: 10.179.72.47/24 Operating System: Debian 10 (Buster) KeepAlived version: v2.…
Haproxy Route Acme-tls/1
15 Januari 2021
HAProxy v2.2 punya req_ssl.alpn. Deskripsinya aku kutip dari dokumentasi: Returns a string containing the values of the Application-Layer Protocol Negotiation (ALPN) TLS extension (RFC7301), sent by the client within the SSL ClientHello message. Note that this only applies to raw contents found in the request buffer and not to the contents deciphered via an SSL data layer, so this will not work with "bind" lines having the "ssl" option. This is useful in ACL to make a routing decision based upon the ALPN preferences of a TLS client, like in the example below.…
HAproxy Dynamic Responses
10 Januari 2021
Return custom response terhadap request tertentu, ketika pakai Nginx aku sering banget pakai ini. Seringnya aku pakai untuk cek “detak jantung” si nginx, dan stateless acme challenges. Contoh config-nya seperti ini http { ... server { ... location ~ ^/\.ping$ { default_type text/plain; return 200 "Pong!!!; } ... } } Nah, di HAproxy juga ada fitur serupa, sayangnya baru ada sejak haproxy v2.2. Di Haproxy kita bisa pakai direktif http-request return .…
Cara Mudah Upgrade Ingress Controller Traefik V1 Ke V2 Tanpa Downtime
9 Januari 2020
Traefik adalah reverse-proxy yang dibuat dalam konteks artikel ini yaitu reverse-proxy untuk service dalam kubernetes cluster. Dalam konteks artikel ini traefik berperan sebagai ingress controller. Tugasnya adalah untuk meneruskan request dari luar kubernetes cluster menuju service yang ada di dalam kubernetes cluster. Gambar berikut ini akan menjelaskan apa fungsi Traefik Traefik sebagai reverse proxy tentu saja belum sematang HAProxy atau Nginx. Lalu kenapa pakai traefik? karena Traefik sudah cukup stabil untuk habdle request, built-in let’s encrypt integration, dan tentunya karena dukungan traefik sebagai kubernetes cluster ingress controller.…
Setup Bastion Host Pakai Haproxy Dan Wireguard
1 Januari 2020
Apa itu Bastion host? Bastion host adalah: A bastion host is a special-purpose computer on a network specifically designed and configured to withstand attacks. The computer generally hosts a single application, for example a proxy server, and all other services are removed or limited to reduce the threat to the computer. It is hardened in this manner primarily due to its location and purpose, which is either on the outside of a firewall or in a demilitarized zone (DMZ) and usually involves access from untrusted networks or computers.…
HAProxy X-XSS-Protection
10 Januari 2020
Untuk set response header X-XSS-Protection: 1; mode=block pada haproxy, cukup tambahkan konfigurasi berikut ini kedalam section frontend: rspdel X-XSS-Protection:\ 1;\ mode=block rspadd X-XSS-Protection:\ 1;\ mode=block
HAProxy X-Frame-Options
10 Januari 2020
Untuk set response header X-Frame-Options: SAMEORIGIN pada haproxy, cukup tambahkan konfigurasi berikut ke frontend section: rspdel X-Frame-Options:\ SAMEORIGIN rspadd X-Frame-Options:\ SAMEORIGIN
HAProxy X-Content-Type-Options nosniff
10 Januari 2020
Untuk set response header X-Content-Type-Options: nosniff pada haproxy, tambahkan konfigurasi begrikut ke bagian frontend: http-response set-header X-Content-Type-Options nosniff
HAProxy SSL A+
10 Januari 2020
Cara mendapatkan skor SSL A+ dari SSL Labs untuk haproxy global section, tambahkan: ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets frontend https, tambahkan: bind *:443 ssl crt /etc/ssl/jekyll.nalakawula.com.pem alpn http/1.1,h2 # HSTS header (1 year = 31540000 seconds) http-response set-header Strict-Transport-Security max-age=31540000