Skip to content

Instantly share code, notes, and snippets.

@sphinxid
sphinxid / whois-asn-ip
Created January 26, 2023 16:08 — forked from bmatthewshea/whois-asn-ip
BASH script that uses 'whois' to lookup ASN number and display all IP4 CIDR associated to it.
#!/bin/bash
# whois-asn-ip (bash script)
# By: Brady Shea - March 15th 2020
# https://www.holylinux.net
# https://gist.github.com/bmatthewshea/dc427f0c30b82429931d5896f548d550
# The whois server to use:
WHOISHOSTNAME=whois.ripe.net
# Uncomment to remove temp files
#DEL_TEMP=true
@sphinxid
sphinxid / README-reverse-proxy-in-haproxy.md
Created March 26, 2019 05:11 — forked from drmalex07/README-reverse-proxy-in-haproxy.md
Perform simple reverse-proxying in HAProxy. #reverse-proxy #proxy #haproxy #proxypass

A more complete example (with rewriting cookie domains/paths) can be found at http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/

We will try something roughly equivalent to the following ProxyPass directives in Apache2:

ServerName www.example.com
...
ProxyPass        /foo/  http://foo.local
ProxyPassReverse /foo/  http://foo.local

In haproxy.cfg we define a backend, say foo, to reverse-proxy to foo.local backend server.