Molecular dynamics simulations were used to study ionic flow in carbon nanotubes with the goal of using carbon nanotubes as artificial protein channels found in cell membranes. Simulations show that ion occupancy in a carbon nanotube solvated in an electrolyte is very low. When partial charges were placed on the rim atoms of an uncapped (16, 16) tube and an external electric field was applied it was found that the ion occupancy increased significantly. To mimic an ion channel in a membrane, functional groups were attached at the ends and the tube was placed in a slab. The functionalized tube was found to conduct ions in the presence of an electric field and depending on the direction of the field it was selective to anions over cations.