Locally cached dns cannot be uncached through cache refresh linux - linux

So I run a semi-private website for myself, locally hosted on my network, and port forwarded to the web. I changed from using one computer to another to host it, and whilst my public IP address correctly points to the new computer, the subdomain I'm using to access it doesn't.
From what I've gathered so far, this is only an issue on the old host computer, when I dig the subdomain, I get a reply from that localhost saying the subdomain points to localhost, but everywhere else the new subdomain points to the public IP. If I dig and ask even my router for the correct IP it points to the public one.
I've tried to flush the dns cache, but that didnt change anything.
I'm running Ubuntu Linux, and really confused.

I found it, it was set in my /etc/hosts file, I must've done that and forgotten about it

Related

Domain pointing to IP address (Centos), where is running application

to be honest, Im not experienced in networking and I need your help. What's the problem?
I have a domain, which should pointing to IP Address, where is the application (orangescrum) running. This was set by our IT Department.
Firstly, Im a little bit confused, because when I ping this domain, I expect to get the IP address of my centos machine, but the IP Address is different. (centos machine has a private IP, I receive another public IP address).
Thats the first issue, which I dont understand.
The second problem is, that when I open the domain in browser, I get the application, but without some images, javascripts, which should be included in application folder. I think, that the database doesnt work as well (I cant log in to the application).
Application worked very well on my localhost, but as I pointing the domain to this ip address, there are a lot of think, which are not working.
I know, that I didnt explain the issue very well, so feel free, if you need to specify anything about the set up.
Thank you so much in advance for any idea.
You need to route your machine if you want to access as public static IP or Private add to your DHCP web router if you got admin access http://192.168.1.1 or http://192.168.1.254 debian of ISP try too.
sudo ifconfig
In a intranet context you can add to your hosts the ip_lan domain.lan.com
on linux : sudo nano /etc/hosts
on windows : cmd as admin
notepad c:\\windows\System32\drivers\etc\hosts
the first may be solve the second problem, if no, just look on the code source looking for your "localhost" domain writed on the code source to changing/adding as a variable global and only one reference domain, simple for editing in the future.

nodeJS alternative to IP-Adress or localhost? Avahi-daemon

I am using Nodejs with the express, bcrypt and body-parser packages on an ubuntu linux system.
Everything works fine so far.
However, I´ve been wondering if there is an easier way to connect to my website.
Until now, I have to type in my IP adress, e.g. https://XXX.XXX.XXX:3000 to actually see the content.
I´ve already tried avahi-daemon but did not get it work. Whenver I try 'hostname.local' I get the same error: Firefox is unable to connect to server.
However, using the IP-Adress: https://XXX.XXX.XXX:3000 works.
I would like to access my NodeJS sever with something similar to: computername.local
FYI: I just want to use it in my local network at home.
Does anybody have any idea how to get this work?
You have a couple choices. The easiest,if available, is probably to setup your home router to always assign it the same IP address (how to do that will vary based on your router). If your router has it available, you could also set a host name for it there in DNS settings.
If your router doesn't have DNS settings available, then you can add a line to each of your home computers /etc/hosts file (if memory serves Windows has it in C:\etc\hosts). Let's say the IP you give the server is 172.16.1.11, your hosts entry would be
172.16.1.11 computername.local
You could also setup your own DNS server in your house, possibly even on the same machine as has your node app, and then configure it to handle the one address before forwarding DNS requests for others to your ISP but that seems like overkill if you have just one app.

DNS request serves different IP address for www and non-www?

I am in the process of moving the website traffic for adadarters.com from old host to new host. We are keeping old host for various reasons, including mail and ASP files that we don’t want to move, so I simply modified the A record to point to the IP for new host. After 10 hours it has still not really propagated, even though it appears that it has. I have been doing ipconfig /flushdns all day.
What’s happening is that adadarters.com serves up the NewIP (74.220.215.66) and www.adadarters.com serves up the OldIP (65.254.231.127). If you try and type in the URL without www, it appears to redirect to www and sends you to old host.
The way I figured out was nslookup adadarters.com 205.171.3.66 (my ISPs IP address) vs nslookup www.adadarters.com 205.171.3.66.
Also, a traceroute to adadarters.com vs www.adadarters traces the route to new and old IP addresses.
New host says DNS looks fine to them. Old host says settings look fine to them too, and that I just need to wait longer for it to propagate. But why would www propagate differently than non-www? I think they are just putting me off because they don't know (one reason they are the old host).
Any ideas about what might be happening?If by some chance this has resolved by the time you look, the old host files have the logo on right, new has logo on left and is a WordPress site.
This is off-topic here, you should've asked on https://superuser.com/
Your computer probably cached the old DNS. Try ipconfig /flushdns
The problem clearly is not in your ISP's DNS:
$ nslookup www.adadarters.com 205.171.3.66
Server: 205.171.3.66
Address: 205.171.3.66#53
Non-authoritative answer:
Name: www.adadarters.com
Address: 74.220.215.66

Subdomain IP address changed but client still getting directed to old site

I manage a web site that used to be hosted on Server A. I gave clients a subdomain url that pointed to this server, e.g. app1.example.com
I have moved my web site to a new server, Server B. I changed the IP address of app1.example.com (via the domain name host company) to point to the new server and this worked ok, for me at least. However, I have one client that is still getting directed to the old server.
When I get the client to ping app1.example.com it is trying to ping the old Server A. When I do a ping I get the correct Server B.
I am assuming that the reason for this is that the client must have the IP address cached somewhere. What do I need to tell the client? Would it be to run ipconfig /fluchdns or is the solution going to be more complicated?
The time taken for the DNS records to update over the internet can be anything upto 48 hours.
How long ago did you make the switch to the new server?
If you need them to be able to access it immediatly ask them to edit there DNS record if it is possible. Else you will just need to wait for the DNS update to go through.
It's most likely not the client's fault. There are a lot of ISPs out there whose DNS server reloading intervals are quite long. It can take more than a day hours until a new name server entry is populated to all DNS servers. If it's very urgent, you could tell your client to add an entry to their hosts file.

xampp server (How to get up and running)

I've been developing locally on a little ubuntu netbook with xampp for about 7 months. Two weeks ago I got a computer I'd like to use as a server. I've installed the latest Ubuntu distribution and xampp, moved all my files over, and forwarded port 80. I've also got a domain name from dyndns.com which is being updated by a client which runs in my router (a Netgear WGR6154 v8).
Now, when I try to access my server by typing in the address I got from dyndns.com the browser loads until it timesout. I can access everything locally using localhost as the address so I believe xampp is running, just unable to connect with the internet.
In order to be able to view my files over the internet what should I do next?
Thanks to all in advance...
[I'm starting a bounty for the first person to help me get my files successfully online]
You have a combination of issues here, and that is something of a problem. Each issue is complex in an of itself. Here is what I would recommend to get you going for certain.
First verify that you can surf the web from your server. This will confirm that you have a working ethernet interface.
Step 1 make sure that XAMPP, and your files are viewable from your home network. I assume you are using something like 192.168.1.X for your network and perhaps your server is 192.168.1.10
Go to another computer in your house and type http://192.168.1.10/ and see if you can see your files. If you can then you know that the server is properly configured and XAMPP is working.
Then add an entry to your hosts file to resolve yourdnsrecord.com (or whatever your dyndns record is) to your private ip address. Then when you type yourdnsrecord.com into a browser from that computer you should still get your files. This will rule out your server being improperly configured to listen for that domain name.
Next you need to test to see if there is a firewall problem. To simplify this, first remove your home router from the equation. Instead, place your new server directly onto your internet connection. (assuming you can). This way, you do not need to have NAT or firewalls properly configured. Your dyndns name should map to a public IP and your server should then have that IP and be connected directly to the Internet. If you have your server directly connected, and the command ifconfig from the root prompt returns the same public IP address that your dynamic dns record is point to, then it should work.
It will make your life easier if you have an iphone or some other way to test how your network is seen from the Internet.
If your public IP as shown by ifconfig is different than the IP record in your dyndns account, then your dynamic dns update script is broken. manually set the IP, and see if things work.
It is very possible that this will not work. Some ISPs firewall port 80 preventing their subscribers from hosting servers. Once you have your server directly connected to the internet you can test this (even if your dns is not working) by using the public IP address. As root, type ifconfig from the command prompt to get your public ip address. Then type the command tcpdump -i eth? port 80 from the root prompt. eth? needs to be the same interface that you saw had a public IP address from the ifconfig command. usually this is eth0 but it might be wire0 or something like that.
This command will show you all traffic coming on port 80 to your server.
From an iphone (or whatever second Internet connection you have) browse to the IP address that you got from your ifconfig command. If you see something on your server (and it is directly connected to your ISP) then your ISP is not firewalling you.
If you can get to your server, when it is directly connected to the Internet, either by IP address or by DynDNS address, then your ISP is OK and it is time to debug your firewall.
Two things need to work for your firewall to be configured NAT, where the public address that your router gets from your ISP is converted into your private network and a firewall rule which permits that traffic. If you get this far, then you know your firewall is the problem and then it is just a matter of getting its configuration correct. There are far to many home routers to document here, but you usually can find how-to instructions for your router for this task from the manufacturers website (usually it is part of the manual)
If you follow these instructions exactly you will get your system working. Make comments on the process and I will be happy to modify this to make it clearer.
HTH,
-FT
You should make sure your xampp is not listening to only the localhost.
to do so edit your apache configuration file and check and search for Listen directive
you should be able to know also by analysing the output of netstat -a.
After that make sure your router is forwarding properly, using tcpdump would help.
drop me a comment if you need more help.
Cheers

Resources