Bitcoin
linux – How can I run Electrum on Debian with a restrictive firewall?

So I’m running Debian 9.1 with KDE and I’m using iptables to disallow all outgoing and incoming traffic by default except traffic I explicitly allow.
It keeps disconnecting and shows up as a red dot in the bottom right corner. I already tried manually selecting the server and opening port 5002. When running netstat -pln
Another strange port appears. If possible, I’d like to only use ports 80 and 443. Which ports do I need to open and in what way for it to work? Or is there something else I need to configure to get it to work?