avast isn’t a firewall so it doesn’t have anything to do with opening or closing ports.