0

I was wondering how I can access my Raspberry Pi outside my home network. I can VNC through a SSH tunnel over my WIFI internally but I could never manage to do it externally. Is it something to do with port forwarding and maybe DynamicDNS?? Thanks in advance.

3 Answers 3

3

On your home router you should check for port forwarding

There will be a table that has entries for host, port and some description.

to just get it done : 1. check your IP address by looking at your router's WAN address.

  1. on the router config/port forwarding, forward all requests to port 22 ssh to your RPI' IP address.

  2. To test this just ssh to the address from step 1 , if its all working then you will get a prompt for username.

There are times when your WAN IP will change so yes if you want it to be permanent you should get a domain registered and then sign up for dynDNS service that will allow you to point your domain name to their DNS server and you will get a key from DYNDNS that allows you to run a script every 2-3 minutes to update YOUR actual WAN IP at DYNDNS so they can properly resolve your address when the ISP changes it.

I HIGHLY RECOMMEND YOU HARDEN YOUR RPI if you OPEN it up on PORT 22, install the BlockHost or any of these Blocking IPs

0

I recently read a good article on exactly what your looking for. You can find the article here: http://lifehacker.com/5978098/turn-a-raspberry-pi-into-a-personal-vpn-for-secure-browsing-anywhere-you-go

2
  • 1
    While this article might answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – nc4pk
    Jul 9, 2013 at 22:47
  • I had already seen this page before but I was trying to do it the hard way and learn more.
    – Marmstrong
    Jul 15, 2013 at 9:23
0

If you use RaspBMC for exemple, all external access are block by default. You can change this :

Just edit this file :

sudo nano /etc/network/if-up.d/secure-rmc

Found this lines :

logger -t iptables "Configuring ip tables for interface $IFACE"
if [ "$IFACE" != "lo" ]; then
    NETMASK=$(get_subnet $IFACE)
    iptables -A INPUT -s $NETMASK -i $IFACE -j ACCEPT
    iptables -A INPUT -i $IFACE -j DROP
fi

And add :

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

just before :

iptables -A INPUT -i $IFACE -j DROP

Exit, save & reboot. If you want to open all port => you can comment the logger line and all the if statment. For an other port, just change the 22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .