Hydrophobic interactions and local dewetting of hydrophobic cavities have been identified as a key mechanism for ionic gating in biological voltage-gated channels in a cell membrane. Hydrophobic interactions are responsible for rectification of the channels, i.e. the ability to transport ions more efficiently in one direction compared to the other. We designed single polymer nanopores with a hydrophobic gate on one side in the form of a single layer of C10 or C18 thiols. This nanoporous system behaves like an ionic diode whose direction of rectification is regulated by the pH of the electrolyte. In addition, reversible dewetting of the hydrophobic region of the pore was observed as voltage-dependent ion current fluctuations in time between conducting and non-conducting states. The observations are in accordance with earlier molecular dynamics simulations, which predicted the possibility of spontaneous and reversible dewetting of hydrophobic pores.