I cannot access my Pi B+ outside of the LAN. On the router I have opened port 22 for both TCP and UDP traffic, and routed it to the Pi's IP address. I can connect to the Pi locally, but when I try connecting over internet (3G on my phone, using the router's global IP address) it says "Connecting", and after a while I get "Connection timeout".

What is possibly wrong? Does Raspbian block non-local IP's by default?

  • Does Raspbian block non-local IP's by default? No. I would diagnose this by running wireshark inside the LAN and then try to connect to the pi from outside. You'll be able to see if the router is actually passing the packets on, etc., and go from there.
    – goldilocks
    Dec 30 '14 at 18:29

I would suggest that the issue is more likely an issue with the changes you have made to your router. Some things to think about

  • Can you configure specific application sharing? have you tried to enable ssh sharing?
  • Is the PI using a fixed IP address? are you sure that the IP address selected in the sharing is actually the pi still?
  • Have you disabled the local network (wifi) on your phone when trying to connect to the external IP? I think there may be something in routers that stops you connecting to the external address from the LAN side. NOTE: to overcome this issue for local machines I add an entry in my /etc/hosts config file for my dynamic dns address to my pi's ip (there is an equivalent on windows machines I just don't know where it is).

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.