I have a Raspberry Pi connected to my router via Ethernet, it is currently running a host for a no-ip service, both SSH and VNC are enabled. When I am connected to my home network and enter my no-ip address into putty it connects to the Raspberry Pi.

However when I connect to an open Wi-Fi network and try to connect to my Raspberry Pi using my no-ip address, putty gives a connection refused error. I know I am connecting to the correct port and my no-ip address works when I am connected to the same network as the raspberry pi. So why does the connection not work when I try to access the Pi from a different network? Once I can get the SSH connection to work properly I know I how to set up a tunnel using putty to allow me to use VNC, again I have tested this and it works.

  • 3
    Is it specifically "connection refused"? See here for the significance of that (it's #3). You could check what I describe there with wireshark, but beware open wifi networks may try to detect interfaces in promiscuous mode, so don't do it for longer than you need to (it is not illegal, but you may get disconnected, etc.). You probably only need < 30 seconds anyway.
    – goldilocks
    Jun 25, 2015 at 13:32
  • 1
    Does your no-ip service allow ssh? I've never used one personally, but I've been told some only allow for port 80 traffic.
    – Jacobm001
    Jun 25, 2015 at 14:59
  • Do I need to enable DMZ in my router settings?
    – Darth Vader
    Jun 25, 2015 at 15:20
  • Not getting a reply from the Raspberry Pi, e.g. there is no signal from the IP address of it. My no-ip service is www.noip.com, but even using my router's external IP address I still had the same problem
    – Darth Vader
    Jun 25, 2015 at 15:42

1 Answer 1


Most likely - your router is not forwarding the relevant ports. You could set the DMZ, but that opens all of your ports on the pi to the internet. A better option is to log onto your router and forward the following ports to your pi-

  • 22 for SSH
  • 5901 for VNC (probably not a great idea as it's unencrypted. Better to just open port 22 and then tunnel VNC through that using -

    ssh -L 5901:localhost:5901 -N -f -l [user] [computer]


  • I've set up port 22 for SSH in my router's settings and can tunnel VNC through the connection when connected to the same network as the Pi. The problem is this connection does not seem to work when I try to connect to the Pi from a different network to it. I also used a port checking service and port 22 is definitely open.
    – Darth Vader
    Jun 26, 2015 at 9:09
  • can you ping your router from outside? Also on your pi, what is the output of 'iptables --list'? Jun 26, 2015 at 20:52
  • can ping the router from outside the pi
    – Darth Vader
    Jun 27, 2015 at 14:47
  • The no-ip service, and others like it, just provide name resolution, they don't care about ports or service (ssh vs vnc vs ftp etc).
    – ifermon
    Jun 30, 2015 at 17:58
  • Darth, when you say 'set up port 22', can you be more specific? (Not only must port 22 be open ,it must be forwarded to the internal IP of your pi.) This is usually called either 'port forwarding' or 'services' depending on router brand... Jul 3, 2015 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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