AlejandroZZZ,
Ей,впереди, и стоп позади.
Ahoy....is a call used to attract someone's attention from a distance. It is mainly used in the navy or in nautical situations.
Ahoy there! Эй там!
Ship ahoy! Эй, на судне! Эй, на корабле!
Avast...means hold, stop, stay, cease. It is also a nautical term.
Avast lowering.....stop lowering
Avast heaving.....stop pulling (the rope)
In Russian probably.....стой!, стоп!
----------------------------
In that play, which is a farsical comedy, it is a pun.
The joke depends on the double meaning...avast behind = a vast behind.
Ahoy in front.......pay attention to the frontside of that beautiful woman.
and avast behind.......and she has a vast (a very large) behind.
The only Russian equivalent that I know of is -
Смотрите здесь, смотрите там! Нравится ли это вам?