Iptables blocking SSH access

December 9, 2014 2.3k views

I’m on Ubuntu 14.04, and somewhere along the line of trying to change my SSH port from 1365 to 22, I locked myself out of accessing the computer via SSH. I can SSH into port 22 from the localhost, so I’m guessing the problem is with iptables (yes, I did update the config for the new port). I’m using fail2ban to prevent SSH brute forcing. The VPS also runs OpenVPN AS. Here’s a screenshot of my iptables INPUT chain.. If anyone could help point me in the right direction of what might be the problem, I would be grateful.

1 Answer

You can access your server using the built in console access on your VPN page. The console access simulates the physical connection of a keyboard/monitor - so you can’t lock yourself out of that.

  • Yes, I know. That’s how I took the screenshot. For multiple reasons, I need actual SSH. One of which is that the built in console is pretty terrible in my experience.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!