Page 1 of 1
Raspberry Pi Public IP
Posted: Wed Jun 18, 2014 7:08 pm
by vitinho444
Hey guys, I've been bored sometimes and as i was playing with raspberry pi, i thought, why not try owncloud and let's make a cloud huh?
So i tried a tutorial, and it works fine i guess, but the problem is, what if i want to access it outside my network, i need to visit a public IP right? Well that's the thing, i already did a ifconfig curl or something and i got the exact same public IP as in my desktop.. But the thing is, if i try to access it from my desktop it finds nothing.. But if i run apache on my desktop it find my webserver (in the desktop).
So how can i assign a public IP to my rasp PI to access it from anywhere?
Thanks
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 12:45 am
by Jackolantern
Are you forwarding the port calls through your firewall? Most port requests are considered malicious by the firewall unless you set it up.
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 9:06 am
by vitinho444
If you're talking about the router's firewall then yes, i forwarded port 80, 8080, SSH, and FTP and still can't connect... this is the only problem with my PI atm.
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 1:49 pm
by hallsofvallhalla
That was my point about DMZ. Open it to that lan address and try it again. If you can get through then you know there is an issue with a port or firewall. You can turn it off later.
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 1:56 pm
by vitinho444
hallsofvallhalla wrote:That was my point about DMZ. Open it to that lan address and try it again. If you can get through then you know there is an issue with a port or firewall. You can turn it off later.
Right

I'll try, but 2 questions:
1- What if it still doesnt work?
2- How can the browser pick a server (Desktop or PI)?
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 2:10 pm
by hallsofvallhalla
the browser doesn't pick a server. It is routed. Try the DMZ then let us know. Remember to open DMZ to LAN of Pi. Make sure desktop apache is off.
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 3:41 pm
by Jackolantern
vitinho444 wrote:2- How can the browser pick a server (Desktop or PI)?
Pretty much as Halls said, the browser does not pick a server. Every port can only be open with one application. This is why things like SQL Server Reporting Services and Skype cause problems with Apache: once one program opens a socket, no other program can open the same port. You can only have one server running.
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 8:07 pm
by vitinho444
I tried DMZ host to my pi, and restarted apache and accessed the public IP but it still says "Ops, google chrome couldn''t find.."
I tried using the local IP (192.168.1.4) and it works, but with the public it just doesnt... What am i doing wrong?
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 8:43 pm
by Sharlenwar
I'm not sure, what I do at home is I assign a static IP to a particular mac address within the network. This way you aren't using DHCP (so the ip's don't change when they are renewed). Then within the router itself you should be able to forward ports by assigning the IP and what ports are open for that IP. I believe http uses port 80 as it is a standard port. Once that is done, you should be able to type in your external ip and the website in theory should appear if it is port forwarded correctly. I would do screenshots, but I'm not home at the moment. In about 4 hours I'll be home, so I'll update this post.
Try this resource:
http://portforward.com/
Re: Raspberry Pi Public IP
Posted: Thu Jun 19, 2014 10:26 pm
by vitinho444
Well DMZ should open EVERY port on the given IP. And in a tutorial installing xampp and stuff, they thought how to set the static IP, so i know its 192.168.1.4 EVERYTIME.
My router is a bit stupid.. :/
I read that it can take a minutes to apply... I'll try tomorrow again. If it doesn't work, do you guys have some sort of tut on installing apache and mysql for a webserver only?