Easy Way to define what port goes to which end (Brakes)

Basic principle is that the PORT with the LONGEST STROKE goes to the FRONT BRAKES

Front Port Rear Port

FRONT BOWL Larger / forward stroke longer - FRONT PORT to Front Brakes ....

The front fluid well / reservoir is larger than the rear fluid well / reservoir, and this indicates that the front port is for the (primary) front brakes / rear port is for the (secondary) rear brakes. The Mustang master cylinder directly below the Camaro master cylinder (in the link above) is a back to back visual on the reversal of the design / port locations. You will notice the rear reservoir is larger on the Mustang MC, and that the rear port feeds the primary / front brakes.

Front Port Rear Port

REAR BOWL larger / Rear stroke longer - Rear Port to Front Brakes

If you look at all of the master cylinder images, you will also be keen to note that there are different distances between the ports in relation to the fluid wells. Take a look all of them, and you will notice that there is a long segment and a short segment to them all. The long segment will feed the primary brakes, the short segment will feed the secondary brakes. That being said, if you are looking at a MC with what appears to be an equally sized reservoir, such as this Mopar MC in the link below, you will still see a long segment and shorter segment (in relation to where the ports are located in the casting)

Equal Bowl size / equal stroke sections - Either Port to front/Rear