A bio-inspired dumbbell-shaped nanochannel with a controllable structure and ionic rectification.