-> only “localhost” and SRC IP x.x.x.x/y can access this URL. Rest will be blocked.-> Disadvantage. Container needs to be restartet if the Source Range gets modified!
we can do this better :)
Move to File
you may want to put your “IP Ranges” to a dedicated File and import it where needed.
Let’s assume you have a URL “https://whoami.your.domain.de/removeme" and you wanna get rid of the “removeme” before passing the Request to the Webserver. Stripprefix is your friend …
user@docker:~$ while true; do echo $(date); curl -s https://whoami.your.domain.de |grep "Too" ; sleep 0.1; doneWed Oct 12 18:43:57 CEST 2022Too Many Requests
Wed Oct 12 18:43:58 CEST 2022Too Many Requests
Wed Oct 12 18:43:58 CEST 2022Too Many Requests
Test Limit with hey, 10 Concurrent
100 Requests, 10 Concurrent, Wait 1 Second between Poll
You’re now exposing all your logfiles to the Internet on Port 8888. Apply some FW Rules on the Host, on the Cloud Provider or wherever it fit’s for you ….
i like and widely use wireguard for my infrastructure. i’m also aware of it’s limitation and i know the tailscale project but never gave try. recently, i stumbled upon the headscale project, an opensource alternative to for the (closed) tailscale server. perfect, let’s give a try!
and, of course, i’m gooing to implement this with OpenBSD, what else ;)
i don’t like ssh & password authentication. but sometime, specially during setup or recovery, it’s need and make sense. thought i’ll protect some boxes with otp. here a few notes and instrucations
Build login_otp
git clone https://github.com/reyk/login_otp
cd login_otp
make obj
make all
doas make install