Open joegasewicz opened 5 months ago
I deleted my previous responses as I misunderstood DO's outbound firewall rules.
Does your 502 page mention nginx? If so, it isn't DO's firewall blocking inbound connections. I think your issue is your outbound ports. Are you sure your service isn't talking to services that aren't HTTP/HTTPS/DNS or at least not on the expected port? Running tcpdump
or ss
without the firewalls will let you see what ports your server attempting to reach out to.
Bug Report
I have created the following digitalocean terraform config for a firewall to allow all traffic over http/https, ssh etc. I was asked by Digital Ocean to add a firewall as after a port scan they closed the port that my Redis instance was running on as they mentioned this is a security risk.
This is my configuration -
This is the droplet
This is the firewall
I have a docker-compose stack that runs inside the droplet, it works until i add the firewall. one of the containers in the stack is an nginx image, with the following config -
Describe the bug
After adding this firewall & i try to see the website in a browser with for example - http://www.nottoboard.com/ Please note: I have currently turned the firewall off for this website until i can resolve this issue, so if you check this url it will seem like it works.
With the firewal turned on I get a
502 Bad Gateway
.Affected Resource(s)
Expected Behavior
The website should be available over port 80 so that i can access the website from a browser.
Actual Behavior
The website responds with -
502 Bad Gateway