Separation of Variables for a flux tube with an end