This message was deleted.
# community-help
s
This message was deleted.
j
You'd want to open 443 to 0.0.0.0 and your peering port to be open to just the other droplet private IPs
b
I have set the following: Inbound Rules SSH -> 22 HTTPS -> 443 Custom - TCP - 8107 -> 3 droplets Custom - TCP - 8108 -> ALL traffic Outbound Rules: HTTPS -> 443 Custom - TCP - 8107 -> 3 droplets but something blocks the connection
j
8108 is the default http port. If you've changed it to 443 and using an SSL cert, then you want to allow 443 inbound all traffic
You also need outbound 443 -> 3 droplet IPs
b
I use nginx on top typesense, so the port is 443 and proxies default port 8108
j
I see, could you share your nodes file?
b
The node files has just the private ips
Is there any other port that should be opened?
j
No, just the peering port (8107) and api port (8108)
b
So in my case that I use Nginx the outbound ports should be: HTTPS -> 443 -> ALL Traffic Custom - TCP - 8107 -> 3 droplets Custom - TCP - 8108 -> ALL TRaffic
j
I'm not sure if digital ocean firewall rules are stateless or stateful...
Could you start with allowing ALL outbound, and only set inbound rules
and then once the inbound rules are working, then layer on specific outbound rules
b
Ok i'll try it
For Inbound Rules I have: SSH -> 22 -> All Traffic (will be limited) HTTPS -> 443 -> All Traffic Custom - TCP - 8107 -> 3 droplets Custom - TCP - 8108 -> ALL traffic
j
Is there a separate instance of nginx running on each droplet?
b
Yes
Okay with All outbound works
*All TCP
j
Custom - TCP - 8108 -> ALL traffic
If you're sending all traffic through nginx in front, then this is not needed.
But you'd have to use 443 in your nodes file
b
If I set HTTPS -> TCP -> All traffic it doesn't works. It blocks the request
Okay I fixed it, it was a port issue.
In outbound rules do i need this: Custom - TCP - 8107 -> 3 droplets in order the droplets to connect to each other
Is it mandatory to limit outbound traffic?
j
From Typesense's perspective - no. It's hard for me to speak to the outbound rules in DO, because I don't know if those are stateful / stateless rules, so don't want to make a bad recommendation
In general, outbound firewall rules are to prevent an attacker who has compromised your VM from making unauthorized API calls to random remote services
👍 1
b
But if the attacker has compromised/hacked my vm wouldn’t be very easy to change the firewall rules as well? So in this case most important are inbound rules which limit the access, am I wrong?
j
The firewall rules are configured in the Digital Ocean UI right, not inside the VM? But yeah, I would say inbound firewall rules are way more important than outbound. Inbound rules are for prevention, outbound rules are for limiting damage after an intrusion.
b
Okay thank you for the clarification Jason