apache - Raspberry PI Web server - Local connection good - outside local no connection -


i don't have ton of experience routers or port forwarding, have new raspberry pi , wanted see if set simple hello world page educational purposes. have quite bit set apache2 installed , web page works great on local area network, can't connect using lte phone, telling me thing not connect internet.

i using rasbian under default settings pi.

my router in 1 modem , router, xfinity. after sifting through countless sites trying solve issue, following 2 closest thing particular issue. reputation not high enough put more 2 links, put important ones..

so best of knowledge way ... 1) set web server work locally 2) go router ipv4 or ipv6 (shouldn't matter which) , forward port 80 traffic to, say, port 8080 pi 'should' listening, send web page down through port 80 client calling web page.

under 10.0.0.1 find this...

this http://i66.tinypic.com/fpaz35.png

then go 'advanced'

settings http://i68.tinypic.com/2qn6w45.png

i have tried start port 80 end port 8080, 2 pi files edited listen port. files under

sudo nano /ect/apache2/sites-enabled-000-default.conf 

and

sudo nano /ect/apache2/ports.conf 

i changed

listen 80 

to

listen 8080 

and other combinations alongside changing router start , end ports... none of worked lead believe there either knowledge gap or doing terribly wrong.

i want put raspberry pi web server online local connection @ home using comcast xfinity router. if has experience doing, appreciate it, i've spent far many hours trying walk through alone, reaching out faithful stackoverflow community.

it sounds there.

for able access raspberry pi server internet, need find external ip address. router has 1 external ip address can reach internet. while on wifi, search google "what ip" google may display top result, or might have click site ipchicken. write ip address down.

next, setup router forward port 80 (default http port). try setting apache listen on port 80, , have router set start port , end port port 80 (this makes don't have put :port-number in address, i.e. http://your-ip-address rather http://your-ip-address:8080). start port port on external network, end port apache server running on raspi.

it looks raspi has ip address of 10.0.0.17 on local network based on screen shot. if doesn't, change ip address in port forwarding section of router configuration ip address of pi. can figure out assigned ip address of pi through router interface, or typing ifconfig -a , looking ip address of adapter you're using connect network. router may have ability assign static ip address raspberry pi while it's connected network. dhcp reservation. you'd need find mac address of pi. can ifconfig -a well. configure modem assign pi same ip address you've configured in port forwarding.

now setup, switch cellular connection , try go ipaddress google gave you.

type your-ip in browser address bar -> port 80 request modem's ip -> you've set external port 80 requests forwarded port 80 on internal network device 10.0.0.17 -> raspberry pi serve html

note: external ip address of modem not static unless pay static address. address stay same @ least day though, if you're testing, it's not big problem. in future, if want ensure you'll able reach pi, dynamic dns.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -