This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ curl -u dataplaneapi:mypassword \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "name": "consul-server", | |
| "address": "consul.local", | |
| "port": 8500, | |
| "enabled": true, | |
| "retry_timeout": 10 | |
| }' http://localhost:5555/v2/service_discovery/consul |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: networking.k8s.io/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: web-ingress | |
| namespace: default | |
| annotations: | |
| haproxy.org/ssl-redirect: "true" | |
| haproxy.org/ssl-redirect-code: "301" | |
| haproxy.org/ssl-certificate: "default/tls-secret" | |
| # ... other ingress settings... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global | |
| maxconn 60000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| frontend default | |
| bind :80 | |
| # ACL for "example.com" and "www.example.com" | |
| acl ACL_example.com hdr(host) -i example.com www.example.com | |
| use_backend be_example.com if ACL_example.com | |
| # ACL for "example.net" | |
| acl ACL_example.net hdr(host) -i example.net | |
| use_backend be_example.net if ACL_example.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| frontend stats | |
| bind :8404 | |
| stats enable | |
| stats uri / | |
| stats refresh 10s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ kubectl logs haproxy-kubernetes-ingress-6bbb4f9f5f-lt8j | |
| 2021/02/03 17:19:42 HAProxy Ingress Controller v1.5.0 a5e81ae | |
| 2021/02/03 17:19:42 Build from: git@github.com:haproxytech/kubernetes-ingress.git | |
| 2021/02/03 17:19:42 Build date: 2021-01-21T10:15:17 | |
| 2021/02/03 17:19:42 ConfigMap: default/haproxy-kubernetes-ingress | |
| 2021/02/03 17:19:42 Ingress class: | |
| 2021/02/03 17:19:42 Publish service: | |
| 2021/02/03 17:19:42 Default backend service: default/haproxy-kubernetes-ingress-default-backend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python /usr/bin/sqlmap \ | |
| --random-agent \ | |
| --cookie="PHPSESSID={YOUR SESSION ID};security=low" \ | |
| --dbs \ | |
| --url="http://{YOUR SITE IP}/vulnerabilities/sqli/?id=&Submit=Submit" \ | |
| -p id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git clone https://github.com/haproxytechblog/haproxy-api-monetization-demo.git | |
| $ cd haproxy-api-monetization-demo | |
| $ sudo docker-compose up -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| frontend fix_listener | |
| mode tcp | |
| bind :443 ssl crt /etc/haproxy/certs/cert.pem ssl-min-ver TLSv1.2 | |
| default_backend fix_servers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ lscpu -e | |
| CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE | |
| 0 0 0 0 0:0:0:0 yes | |
| 1 0 0 1 1:1:1:0 yes | |
| 2 0 0 2 2:2:2:0 yes | |
| 3 0 0 3 3:3:3:0 yes | |
| ... | |
| 60 0 0 60 60:60:60:0 yes | |
| 61 0 0 61 61:61:61:0 yes |