I recently setup a basic Ubuntu Server at my home and while at school can't access it because the SSH port (22) has been closed. This lead me open up different ports on my server for SSH so that I could access via an open port at my school. I ended up opening port 21 typically for FTP because I did a network scan and found it was open on the school network. I tested SSH from my home network onto the server using port 21 and was successful but upon attempting it at school I was unsuccessful. My question is why was it unsuccessful? And what can be done to fix it?

I am aware that I shouldn't be trying to circumvent there blocks but I am really curious on why it isn't working.

  • Could be they are doing Deep Packet Inspection and dropping anything that looks like ssh - they can do a lot more than just look at ports and addresses if they want to
    – crovers
    Nov 16, 2016 at 15:59
  • Maybe but why would they? Also this is a public school that doesn't have unlimited resources for security.
    – 1ntel0pe
    Nov 16, 2016 at 16:01
  • 1
    Generally to shut down Command and Control connections back from malware to their controlling server. They may well be running a standardized firewall with a standardized set of rules created by people who decently know what they are doing at the board or ministry level (if a public school)
    – crovers
    Nov 16, 2016 at 16:03
  • Alright well thank you for your help. What would you recommend? Would a VPN work or is SSH access just not an option.
    – 1ntel0pe
    Nov 16, 2016 at 16:43
  • You could try a vpn, but I suspect it'd be similar results. There are some that conceal traffic over https, which can't be packet inspected, but you're starting to get into 'willfully bypassing security', which is likely grounds for unpleasant action. I'd let it go if I were you
    – crovers
    Nov 16, 2016 at 16:55

1 Answer 1


Yo're assuming the problem is at the school, but you may be wrong; the problem may be at your ISP or your router. Have you done a portscan on your public IP address using an online portscanner? Does it report port 21 at your public IP as open?

It sounds like you set up a server at home. So to reach it from school, you must pass the schools firewall, the ISPs firewall and the firewall installed on your home router. Outgoing firewalls are usually configured to allow traffic to common services such as ftp, so while possible, its unlikely that your school would deny an outgoing ftp connection.

Incoming connection attempts are a different story. ISPs often configure their firewalls to block common ports to protect their clients' home networks from attacks. The same goes for your home router.

Even if port 21 on your public IP address is accessible from the internet, to reach your server, you must configure your router to forward connections to port 21 to the server machine. If you don't do that, you try to reach your router's ftp port, which will be closed or filtered.

Your server is reachable from home because it sits in the same network, so there are no firewalls to pass through which could block traffic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.