Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a Raspberry Pi set up as a server. I can acces it with, because i'm in the same network. Now I would like to be able to acces my Pi from outside my network (eg school).

I want to allow traffic to flow from the internet to my Pi. I know I have to make the IP address of the Pi look as though it is from the router with NAT and open up ports. The ports that need to be allowed through are port 80 (http) and port 22 (ssh).

I'm on a Mac osx 10.9.2, in airport utility, I've got router mode DHCP and NAT enabled and set up DHCP reservations based on MAC adres (it also asks IP adres, isn't this weird as it's dynamic and it will change, do I have to setup a static IP?) In the port settings I put 80 and my private IP adress.

How do I find out the public IP adress of my Pi? I feel I still have to do a lot before this works but I'm kind of stuck at this point. If anyone could point me in the right direction of what to do next, it would be much appreciated.

Also, are there any security measures I should consider because it sounds like enabling certain ports to allow traffic from the internet to my pi can be risky.

Please bare in mind I'm a beginner (not familiar with certain technical terms) and just experimenting around.

share|improve this question

migrated from Apr 14 '14 at 16:21

This question came from our site for system and network administrators.

Related:… – That Brazilian Guy Apr 14 '14 at 17:01

You first need to find out your internet-facing IP. This is simple, go to (other services are available). The IP shown is the IP of your router - set up port forwarding from your router to your Raspberry Pi to allow traffic to pass from one to the other (you seem to have this covered).

You also need to find out from your internet provider whether you have a static IP or a dynamic IP. A static IP will not change (at least, not often) and you will be able to keep using the IP you found at the link above. However, static IPs are a dwindling resource and chances are that if you don't pay for one, you have a dynamic IP.

Dynamic IPs are so called because they change. This might be five times a day, or only when your router gets rebooted. That's up to your ISP. It means going to the IP you found above will work right now, but next time your IP changes you will have to find your new IP. You may find a Dynamic DNS provider will help you get around this (example being free provider )

Security-wise, you are letting the internet into your Pi. Even if it is only through port 80. Make sure your software is kept up to date and that appropriate permissions are put on any web accessible applications. See your distro guidelines for advice on securing the server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.