How can I get Electrum running under Debian with a restrictive firewall? So I'm running Debian 9.1 with KDE and am using iptables to disallow all outgoing and incoming traffic by default except that which I explicitly permit.

I keep on being disconnected with a red dot in the bottom right. I already tried selecting servers manually and opening port 5002. When running netstat -pln other strange ports show up. If possible I'd like to only use port 80 and 443. Which ports do I need to open in which way to get it working? Or is there anything else I need to configure to get it working?
The solution was to use Tor: under network options set the proxy to SOCKS5 localhost 9050.