You can't prevent it.. Cars aren't remotely airtight (which is a good thing if you think about it), closing windows and setting HVAC to recirc may reduce it slightly but at the same time will reduce your supply of "fresh" air. The cabin air intake is unlikely to be the main source of fume ingress to be honest (depending on exactly where the leaks in the exhaust system are)
Honestly if this is severe enough that you can tell your getting them in the cabin then it's not safe to drive beyond the bare minimum to get it somewhere for repairs. These aren't small leaks! You'll also be making them worse by putting them under pressure.
There are lots of nasties in exhaust fumes and you could end up impaired without realising it. Carbon monoxide being one of the worst.. Its colourless, odourless and even low level exposure can cause dizziness, and drowsiness. Not good when driving a car!!
If you can't get to a garage anytime soon see if you can use something like Holts Gun Gum to patch the leaks, this is a suitable temporary repair and should tide you over till you can sort a proper fix.