Rear port of master cylinder is for the front brakes.
Front port of master cylinder is for the rear brakes.