What I did was set a kind of trap, I put a 1 block wide 2 blocks long trench directly in front of the portal that was about 5 blocks deep so that if they step off the portal they fall.
Next I placed signs inside the trench on the bottom of the portal (the signs will make the zombies think there is a block there they can stand on so they will walk off and without them the zombies will just stand on the portal frame crowding it to prevent falling which over time can cause issues since they dont go away on there own).
In the bottom of the trench I started digging a 4 block long 2 block wide hallway away from the portal going straight (so if you came out of the portal and fell down the trench the hallway would be directly in front of you). At the end of the hall I put a sign on the stone at the bottom left and right side (it was tone for me but could be any block really and I will explain why I did this later).
Next under the signs I dug a hole at least 3 blocks deep (so they cant jump out) and put lava in the bottom of the hole. After that I turned around going back to the spot they would have landed at and on the wall going in the same direction as the portal (so the wall I am looking at would be behind them if they fell off the portal).
I then removed the left and right blocks that were 1 block away from the ground putting 2 fence gates in there place. Next I removed the bottom left/right blocks under the fences and placed water there (I put 2 water sources 1 on each side but you probably only need 1). After that I took out the blocks above both water sources and the ones above those as well making a step up out of the water behind the gates.
Next I continued mining in that direction behind the fences to make another small hallway with a way back up to the portal room (so if I fall into my own trap I can get out easy). After that was finished I placed 2 pressure plates on the floor behind the gates so that after I fall then go through the gates I step on them and they will close the gates for me (optional).
In the end it made it so when you fall down the hole next to the portal the water will try to push you into a lava pit (the signs that were placed should stop the water at the block just before the lava pit and make the zombies think they have a place to stand so they wont try to swim forever). The fence gate will prevent any zombies from going up the back way while giving players a chance to get out if they ever fall down there but if you didn't use pressure plates like I did make sure you close the gates after you use them.
This is the best easy way I have found to keep your base pigman free.