Legal only in singles, not doubles. Forward is allowed only the 3bar and 5bar, while the goalkeeper is allowed only the goal and 2bar.
In singles, however: If you have a decent passing 5bar, you should only take a couple of days to work out a legal 2-to-5 pass on the near or far side. EVEN IF YOU HAVE AN EXCELLENT SHOOTING SERIES from the 2bar. The trick is to reliably learn to brush your passes at an angle to the wall or upwards away from the wall. A simple bounce-pass off the wall is very common among good 2-to-5 passers. Stick or "square" 2bar passing usually only works on a passive 3bar or the opposing forward is sleeping. A 2-to-5 passing series is very handy to have, because although a solid zone defense against both shots or passes from the 2bar are easy to snap to immediately in doubles, it is a lot harder in singles to set up the goal and 2bar while still defending with the 5bar and 3bar. Especially if the ball is being crossed over back and forth at the 2bar between the near and far sides.
It also comes in handy in singles when the opposing player just keeps either bricking your shots or clears from the goal area. And its an automatic if your singles opponent simply positions his 3bar and 5bar and jumps back to his goal and 2bar in an absolutely passive defensive position. It really doesn't matter whether you do nearside or farside left hand passing on the 2bar to your 5bar or your 3bar, for that matter. They're both better than left hand 2bar passing (pretty suicidal, actually) from in front of, or very near the goal area. It's also better if you can master BOTH the farside and nearside 2-to-5 series, obviously, because it gives you more options in case the opposing forward just shuts down any passing on one side or the other.
I thought it would be hard to get a decent 2-to-5 passing series, but after learning to brush down or bounce up from a wall dribble on the far side, it felt like my beginner days when I would dribble the ball off the far wall and waiting for the 3bar to open up before I shot the ball from the 2bar. A week after getting the brush and bounce-up, it was easy to select a spot between the wall and the big rectangle or penalty box area to shoot a stick to my 54 player (2nd in from the farthest 5bar player - th 55 player). Had fun with this in pickup games, had a very nervous time (lost quite a few in the beginning) in real matches, then it was easy. I then started working on my near side 2-to-5 series, either a brushdown to the 51 or a bounce up to the 52. Just keeps getting better... I also do the 2-to-3 pass, off a back and forth from my left hand on the 2bar to the 3.
Hope you practice it.. It is fun and certainly isn't boring to practice with all the options. Next get a partner who plays forward and practice the 2-to-5 and 2-to-3 using the same strokes. Good luck..