Iron bar inside solenoid, do magnetic field lines repel at sides? Based on the closed loops rule, an iron bar inside a solenoid that has its poles aligned with the solenoid magnetic field, will have magnetic field lines around it that flow in direction opposite to magnetic field inside solenoid. Will that cause the solenoid and the iron bar to repel at the sides, while they attract along the solenoid length?

 A: The field induced in a ferromagnetic bar would be in the direction indicated on your sketch.  Beyond that, the net force (or torque) on a magnetic dipole (atomic or extended) which is lined up with an external uniform magnetic field is zero.
A: You would find the answer on your own by considering the limit values.
In the case that the external magnetic field is switched off, the field of the permanent magnet runs as shown in your sketch.
In the case, the permanent magnet is exchanged by a magnetizable rod, the magnet lines from the coil are running through the rod and through the gap between the rod and the coil. The ratio in which this happens depends on the magnetic saturation of the rod, the strength of the external magnetic field and the width of the gap.
If, in addition, you consider that the field lines as the representatives of magnetic fields can add up - for example when connecting two magnetic rods in series - then the answer should be as simple as uncertain. It depends at minimum from the three parameters “strength of the magnetic field of the coil”, “strength ... of the permanent magnet” and “width of the gap between them”. The situation in your sketch you reach in the case of relative weak field of the coil, strong permanent magnet or big gap.

Will that cause the solenoid and the iron bar to repel at the sides, while they attract along the solenoid length?

In any case, be this for the case of your sketch or for a common field with added field lines, the equilibration is fragile and the magnets tend to approach.

After reading your other questions I realized that you asked about a metal rod inside a coil and not a permanent magnet. In this case simply some amount of the magnetic field from the coil flows through the rod. And, not being perfect balanced, the rod tend to move out of the center and to stick to the coil. 
