Toss star anise, bay leaves and fennel into over medium heat pan. Mix them together and roast for two minutes or until the smell comes out.
Add canola oil, ginger and garlic. Bring it to boil for 15 minutes or 20 minutes. Don't burn the ginger and garlic to avoid bitter taste.
Finely chopped red chillies together using food processor or blender. Transfer finely chopped chillies into the bowl, add 5 spice powder, sugar, chili paste and salt to taste.
Make sure to put the chillies on thick bowl as the oil is super hot. After 20 minutes you can now pour the oil over the chillies and be careful when doing this step. Use strainer and don't burn yourself.
Once oil was poured over chillies, stir and let it cool. The chili oil can be stored at room temperature over 3 monts to 6 months.