User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

public ip and apache server

Thu Sep 29, 2016 1:02 am

Hi all!
Lately I am "playing" with a raspberry pi 3. every day i achieve somthing new, but every two days...something goes terribly wrong. Usually I manage to fix it using this valuable forum, but this time, nothing makes sense....

briefly the story : i installed apache2-> default apache web page accessible from lan --> forwarded port on router --> web page accessible also from outside! everything was great. Then I was trying to put some password protection to that web page/server using the .htpasswd (etc) But i couldnt. so i gave up. Anyway, i then changed the default apache html page to some else very basic like "hello world" page...
initially i checked my dns address and BOOM...i was redirected to my router's settings! I stoped/restarted/uninstalled apache server, but still now essentially i can access my router using BOTH my public AND my routers local IP(192.168.x.x). Thankfully, this only happens from inside the LAN connected computers.
From outside world my public ip does not direct to my router(!)!.

but still! i dont get it. how is it possible that I can access my router with my public IP? and in any case how do I change that?

thank you!!!
fear nothing, hope nothing, be free

User avatar
topguy
Posts: 6498
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: public ip and apache server

Thu Sep 29, 2016 9:04 am

Normally you cant test port-forwarding from inside the router, your router seems to have a feature that loops the traffic back to its LAN address when such a request comes from inside.
( Most other routers just drops the package or send it to the ISP and the ISP gets confused about why the router wants to talk to itself. )
As long as its not accessible from the outside its not a problem in itself, and probably it has been that way all along. If it can be disables then its hidden in the router-settings somewhere.

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: public ip and apache server

Thu Sep 29, 2016 7:23 pm

the truth is i never checked it before... but it seems so weird... anyway i guess you are right. as long as its not accessible from outside should be fine. Any idea how such feature would be called in the router settings?
fear nothing, hope nothing, be free

asavah
Posts: 373
Joined: Thu Aug 14, 2014 12:49 am

Re: public ip and apache server

Thu Sep 29, 2016 9:08 pm

labboy wrote:the truth is i never checked it before... but it seems so weird... anyway i guess you are right. as long as its not accessible from outside should be fine. Any idea how such feature would be called in the router settings?
nat loopback
hairpin nat

Return to “Beginners”