You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we'll need to conduct some load testing to gauge how the backend handles concurrent users even with the proxy, in the case we just want to use cloudflare here is a quick script to configure iptables to allow/limit traffic to docker, then we can use ufw or similar (assuming a debian based box e.g digital ocean droplet)
#!/bin/bash
# Adapted from: https://forums.docker.com/t/restricting-external-container-access-with-iptables/2225/2
# Create a PRE_DOCKER table
iptables -N PRE_DOCKER
# Default action
iptables -I PRE_DOCKER -j DROP
# Docker Containers Public access
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I PRE_DOCKER -i eth0 -s $i -j ACCEPT; done
# Docker internal use
iptables -I PRE_DOCKER -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -I PRE_DOCKER -i docker0 ! -o docker0 -j ACCEPT
iptables -I PRE_DOCKER -m state --state RELATED -j ACCEPT
iptables -I PRE_DOCKER -i docker0 -o docker0 -j ACCEPT
# Finally insert the PRE_DOCKER table before the DOCKER table in the FORWARD chain.
iptables -I FORWARD -o docker0 -j PRE_DOCKER
netfilter-persistent save
Basic Information
Other Information
[Are there any additional information that we should know about?]
The text was updated successfully, but these errors were encountered: