Why does opening ports not work?

‘–permanent’ rules are not added until the service is reloaded. Try running ‘firewall-cmd --reload’