Node-RED GUI 502: Bad Gateway

I have installed hassio Node-RED add-on and I can access it via http://192.168.20.25:1880 but it throws the following error when I start it via ‘Open WEB UI’:
502: Bad Gateway
I have a firewall running on the host (KVM Ubuntu 18.04) and opened port 1880 and just in case opened 46836 (Server now running at http://127.0.0.1:46836/ …). When I disable a firewall, Node_RED opens in Home Assistant. What ports should I open to get it working.