Cutout tube from mesh
With such tubes, the boolean modifier won't remove the cube part in the center of the tubes, as they are not within the tube mesh

I see two possibilities:
1- "apply" the boolean modifier and remove the parts of the cube you don't want (select a vertex in each "inner part" and 'select linked'), or
2- duplicate your tubes, and make cylinders out of the copy (remove the inner wall and close the ends), then use those in your modifier. I'd make the cylinders slightly smaller than the outer diameter of the tubes, to avoid all risk of holes between the cube and the tubes.

The first is probably easier in a static object, the second when you need to animate the tubes