A filament supported by different magnetic field configurations