If your first flight leg is the international leg, you'll be put through customs on first arrival, then have to re-check any bags and go through security again for your connecting flight. I have 2 hours in dubai to get from one flight to the next. This is my first flight.