(Solved) LaMP stack and local www services issues

VastOne

You know you have it good when google searches turn up shat for what you need so you come here for the solution... (soon I will just say the hell to google)

I have a LaMP stack that runs a local version of this web site for backup and restore purposes... it also runs the V-Ger bot for the IRC channel ... everything was fine until recently I had a change to my outward (wan) IP ... it is not static, but it has not changed in 5 years.  The reason for the change now was an upgrade to a new router and faster services and a new IP

The issue is this...

The old external IP is what localhost sees on the server instead of the new IP... I use https://www.noip.com/ for web redirects and if you tried going to http://vsido.no-ip.biz you would correctly see the new IP (http://24.50.134.254:9669/) as trying to load

The issue is back to localhost on the server ... http://localhost shows the old 24.50.131.104 ip and no one can access it, including me internally

I know I am missing something very very obvious, but am drawing a complete blank and after several days I need an assist

I appreciate any input and help to resolve

Thanks
VSIDO      VSIDO Change Blog    

    I dev VSIDO

statmonkey

I would suspect this would be an issue with the port forwarding in your actual modem/router.  That is if I am understanding your issue.  I am guessing that your issue is that you can still contact the modem/router locally (like at 192.168.0.1 or something) but that externally you can't see anything that is under the local umbrella?  If I am off base sorry.  If that isn't it can you give me an idea of the actual issue?

VastOne

#2
Sure... this is the localhost of the machine on this side of the router... the only thing external that that router cares about is that 9669 is forwarded correctly to that machines internal IP

9669 is what is required for port forwarding for anyone to use my side... and is what is needed for you to see my local machine.  That is working correctly, sending http://vsido.no-ip.biz correctly to the new IP (http://24.50.134.254:9669/)

I am seeing it on this side as well... I cannot even access that http://localhost from that machine.. somewhere is a setting on that server that states the localhost is the old IP of 24.50.131.104 and not the new one
VSIDO      VSIDO Change Blog    

    I dev VSIDO

statmonkey

#3
If I am understanding you have a machine that is port forwarding and you can't access it locally but you can see it from the cloud?  Sorry long day and I may be thick headed.

Have you checked the hosts/etc files on that machine to see if they are set correctly. 

In my router/modem (running tomato) there is a setting for the local host IP.  If I change that local host IP I will no longer be able to access it at the old address locally but my noip still works as does my vpn OOPS no it doesn't and I can still see the stuff on the server that is exposed at the correct port and I can only use the new local address I set up.  If I ifconfig I still get my local address and that is the  address that I contact the machine locally with.   EDIT:Confusing

I am sorry I think I am still not understanding the problem clearly.  Probably not too valuable to be guessing solutions when I am guessing the problem.  FWIW there really isn't much to this chain of events.  You have a local address. You set up hostnames on it.  You set up your no ip account. You download the noip updater.  You run the updater.  You are done.


VastOne

I cannot access it anywhere... there never has been a setting (to my knowledge) that I have done that pointed to any external IP.  This is just a complete backup of this forum setup under apache2 in /var/www

I have never had any issues accessing it from anywhere prior to this IP change

Thanks
VSIDO      VSIDO Change Blog    

    I dev VSIDO


statmonkey

Quote from: VastOne on April 21, 2014, 11:32:35 PM
I cannot access it anywhere... there never has been a setting (to my knowledge) that I have done that pointed to any external IP.  This is just a complete backup of this forum setup under apache2 in /var/www

I have never had any issues accessing it from anywhere prior to this IP change

Thanks

That should not affect this (whether it changed locations on the box or is a backup).  The only thing I can think of is the config file in the no-ip updater.

VastOne

right... that is what I am investigating now.. thanks for reminding me of that little tidbit... I think it is the issue and will post back the results
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

All that app does is setup the no-ip daemon to be run monthly to keep you in contact with no-ip and up to date

I reran it again and it makes no difference at all

Still at a loss as to what it is
VSIDO      VSIDO Change Blog    

    I dev VSIDO

statmonkey

That's right but it does need tied to the local.

Hmmm.

I am going to grab a bite and then tear my setup down and essentially do what you have done and see if I can recreate it.  Makes no sense.  I have found noip to be a pretty flawless solution. In other words I am also at a loss.

statmonkey

V. I can't replicate the problem.  I used my vpn to change my ip and all worked great.  So I removed everything and started from scratch following this : https://www.noip.com/support/knowledgebase/getting-started-with-no-ip-com/ using my existing no-ip hostname and followed the steps.  So I then wiped it all and did the same using a new hostname that I have lying around. Again, worked like a charm.

Not to be a mensch but did you walk through this? https://www.noip.com/support/knowledgebase/basic-troubleshooting-guide/#3

Also did you test your ports with open port or http://www.portchecktool.com/

I just can't think what could be wrong.  It really is a 1-2-3 type thing.  The only thing I can think is that it is resolving to some address other than where you think it is.  If that is the case the question would be why?

VastOne

I really appreciate your diligence on this statmonkey and I think you are seeing why I never found anything on google that comes close to this

This is an internal issue and not on the wan side at all ... as a matter of fact, I know that the no-ip setup and router is working simply by trying to go to  http://vsido.no-ip.biz and see that it is trying to access the correct port and the correct new IP address

I should also tell you that on the local server when trying to access its own localhost, it clearly states in the browser that it is trying to access old IP address... it is clearly a localhost issue on that machine, but or the sakes of my fathers guns, I cannot figure it out
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

I also did a system wide grep of the old IP looking for it in every file and cannot trace it to anything that I can edit and change
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

I also did confirm via no-ip2 -S that the correct new IP is what is being used in the config file created and used by no-ip2
VSIDO      VSIDO Change Blog    

    I dev VSIDO

statmonkey

Really at a loss, this will keep me from sleeping I hate when I can't draw something out like this.  About the only thing I can think of is something in the hostnames or maybe apache is using hostname lookup which is tied to the old ip?  I just can't think that it is buried in /etc somewhere.  I mean something is telling it to use A and not B right?  There are a limited number of items that do that (unfortunately which one Debian is choosing to be first priority is sometimes a shifting target).

  I always find the way apache2, php etc. fight over hostames confusing.  You didn't reinstall the lamp stack or anything did you?  Personally another problem I once had was I used tasksel to install the lampstack and next thing I knew dogs were sleeping with cats and all hell broke loose.  I started over and have always done it part by part since.  I wish I was more help -- throwing darts at the map at this point.

I think I am going to look at that end and see if I can find anything.  It's been so long since I had this type of issue I can't remember exactly what is where.