Helicopter
Flight Crew Commercial; Flight Crew Flight Instructor; Flight Crew Instrument
Flight Crew Last 90 Days 250; Flight Crew Total 1500
Conflict NMAC
Flight Crew Took Evasive Action
Airspace Structure; Human Factors
I was with a student providing training. Our flight was planned to complete a VFR cross-country from [the Los Angeles area] to [San Diego area] via the shoreline. Restricted Areas R-2503 A & D were hot so we contacted SoCal Approach for VFR flight following above the restricted area along the shoreline. SoCal gave us a squawk code and cleared us direct to Mission Bay VOR (MZB). We requested to follow the shoreline to remain within gliding distance to shore and our request was approved.Approximately 10 miles south of OCN VOR we were given a traffic alert; 11 to 12 o'clock; above us and heading towards us; both myself and my student had the traffic in sight. As we are looking at the traffic ahead and to the left; directly ahead and slightly below is a high-wing aircraft in a right banking turn. I took over controls and initiated an immediate climb and right turn to avoid the oncoming traffic.I estimate that the aircraft was about 150 feet in front of us (horizontally) and about 50 feet below; but it is very difficult to judge. After regaining straight and level flight I contacted SoCal and advised that there was also an aircraft directly below us to which the controller responded 'roger'.
Helicopter pilot reported that while transiting over restricted airspace with flight following aircrew experienced a near miss event.