Firewall issue to print picture in pdf

hello
i installed ERPNEXT 12 ( last version ) on digitalocean ,for security i bock all port on digitalocean firewall except inbound rules of 80 and 443 , but the problem happened when i want to make any quotation of PDF, letter head and picture not show on PDF .
I open all outbound rule for UDP and then problem solved , any one know which udp port in outbound rule of firewall i should open if i don’t want to open all outbound port ?