Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I was too quick about visiting a site I set up on a customer server, and Firefox now remembers, that the default site for (example)
testsite.mycompanyname.com (non existing subdomain, same as *.mycompanyname.com)
is
www.mycompanyname.dk - or rather the IP of the default server
I have then later set up the public DNS (a-record) to redirect to another server, but Firefox remembers the default IP adress.
Chrome/IE/Safari - no problem, as they have not visited that site before DNS kicked in...
I have set these in about:config:
network.dns.disablePrefetch = true
network.dnsCacheExpiration = 0
Anything else?
I really need firebug to debug the frontend on that site....
Cheers
DNS caching occurs at multiple levels:
Application asks local system,
which asks locally configured resolving DNS server,
which asks authoritative DNS servers.
Caching by Application varies.
I've found for Firefox that quitting and restarting works. The relevant settings in about:config are network.dnsCacheEntries and network.dnsCacheExpiration, which can be set to 0 in order to disable caching.
Caching by local system is typically 1 hour.
Diagnostic: ping, like other applications, uses local system DNS cache
Flush MacOsX 10.8: sudo killall -HUP mDNSResponder (reference)
(May vary for other versions)
Flush Windows: ipconfig /flushdns (only if the DNS caching service, HKLM\SYSTEM\CurrentControlSet\Services\Dnscache, is enabled; check with net start|findstr /i dns or compmgmt.msc)
Linux/Unix may use nscd (name services caching daemon), or dnsmasq, or both ...
Caching by local resolving DNS server may run to several days, depending on TTL associated with DNS record.
Diagnostic: nslookup first reports address of resolving server, then address requested.
Flush BIND: rndc flush or rndc flushname DOMAIN.NAME
TTL stands for "time to live" a term used to describe how long a DNS record is to be deemed valid by the requesting client or server. A short TTL means that the requester is told not to cache a DNS lookup for too long. The TTL can range from mere seconds (e.g. for DynDNS and similar) to days or weeks.
I've been using the "Clear Recent History\cache" solution for a while now, but I've noticed that it stopped working after one of firefox updates (probably 20.0.1). Because of that I've switched to https://addons.mozilla.org/en-US/firefox/addon/dns-cache/ add-on to do the DNS clearing. I hope this will help someone with the same problem.
Edit: Changed the url as suggested by Haozhun.
Edit2: Unfortunately as of FireFox 32, this plugin is no longer compatible and cannot be used. Possibly https://addons.mozilla.org/en-US/firefox/addon/dns-flusher/ might be able to replace it.
Install the addon DNS Flusher, which works for me.
I found that network.dnsCacheExpiration = 0 alone did not quite do the trick, but if you also set network.dnsCacheEntries = 0 then the DNS cache gets disabled for good. So:
network.dnsCacheEntries = 0
network.dnsCacheExpiration = 0
The following methods, which worked at some point, do not work presently (doing all of them doesn't work):
Restarting the browser
Clearing the browser cache
Setting network.dnsCacheExpiration=0
ipconfig /flushdns
However, you can open a new private window, private windows evidently don't use the same DNS cache as the regular windows (which is comforting).
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My ISP keeps on giving new ips every time i connect to the internet. I have no LAN specified and don't need one as of now. Is there any way with which i can have a static ip of my system every time i connect to internet i.e. same public ip every time?
EDIT: See i have a small company and have systems there but no LAN as of now. Now i want certain documents (saved on my internet server) to be opened up in my office only. But my office ISP gives new ips everytime that is why i need a solution with which i can assign static ips to those systems and can restrict that document to be opened up only on those office systems.
If you really NEED a constant IP for your computer, you can always ask your ISP for one, though this cna be a very expensive service.
Another option is to "simulate" this behavior through a dynamic DNS service, such as www.no-ip.com or http://dyn.com/dns/. It associates a domain to your computer (something like iamtheguy.no-ip.com).
This usually requires to install some software on your computer, so that every time your "real" public IP changes, this is notified to the external dynamic DNS server.
It's not possible to "set" your ip to a static one. But you could use a service like DynDNS.
You should take a look at something like this DYNDns
Look at localtunnel.
Looks nice. Also, I found it awhile ago reading this interesting stuff.
Ask your ISP for a static IP - I pay £5 (GBP) per month for mine.
The only other way, if that isn't an option, have your webservice require a username / password when the request comes from an IP that isn't current - This then updates your app to automatically allow requests from the approved IP.
If your IP changes then you'll need a username / password to access again.
However, with this I'd use a strong cookie as well, so that the next person who get's assigned your old IP can't access it for free - i.e. you need both the correct cookie and IP address to access without a username / password.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am able to ping the IP-address of a machine but I am unable to establish a remote desktop connection . When I try to do so it says:
Remote Desktop can't connect to the remote computer for one of these
reasons:
1) Remote access to the server is not enabled
2) The remote computer is turned off
3) The remote computer is not available on the network
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled."
...any help?
If you can ping it, it means it's turned on. If you can ping it, it means the computer is available on the network... which one of the possibility remains? Only one.
Check your firewall rules. Check that VNC Server (or whatever service are you trying to use is running properly). Without other details, our answer can't be more precise.
However, this question is likely to be migrated to http://serverfault.com.
I am assuming you haven't turned off the remote computer, so let's look on the other parts of the error message, i.e. 1) and 3).
As part 1) of the message suggests: Most likely you haven't enabled remote access on the remote computer yet.
How you can enable it, is described here on the SuperUser forum.
Regarding the other reason mentioned by the error message ("2) The remote computer is not available on the network"):
The link above also describes how you can change the default listening port 3389 for RDP (remote desktop protocol) in case it is blocked by the firewall.
Please check as well, if you need a VPN tunnel to establish a remote connection. This is the case in most corporate networks (especially if you're working from home).
Last, but not least, check that your network is running as it should (VDSL or cable modem/router) - keep in mind your modem/router usually also has a firewall: check it and find out if it is blocking.
Finally, one reason could be that the hostname you entered cannot be resolved by DNS (domain name service). Check if you configured DNS correctly on both PCs - and as workaround you can use the remote PCs IP address to connect.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a reoccurring DNS problem that has been plaguing our users, occasionally causing their laptops to append our company's domain to the end of all DNS queries. The problem only occurs when users are off site and it appears to be fairly random. It will work one day and then, out of the blue, it will show the invalid entry. This effects mostly Windows XP users but has recently been seen on Vista as well. Here is an example using nslookup.
C:\Users\Username>nslookup www.yahoo.com
Server: Linksys
Address: 192.168.0.1
Non-authoritative answer:
Name: www.yahoo.com.MYDOMAIN.COM
Address: 999.999.999.999
I have replaced the IP address that is reported with a placeholder but I can tell you that what it returns is the default *. entry on our Network Solutions configuration. Since obvious www.yahoo.com.MYDOMAIN.COM doesn't exist this makes since. I believe the users internal equipment is functioning properly. Internally we run a Windows 2k3 Active Directory w/ Windows based DHCP and DNS servers. Eventually the problem resolves itself usually over a couple of hours or a number of reboots.
Has anyone seen this behavior before?
I've had the same problem with Win XP. I fixed it by installing "Portable DNS Cache and Firewall" and specifying the rule to block "*.com.mydomain.com". This blocks all the queries for ".com" domains that are attempted to be resolved as you company's subdomains.
The default behavior of nslookup is to append domain suffixes to your query.
It will do that until it gets an answer to some question.
It appears that you probably had temporary network disconnection. the host then tried to resolve a name and since it could not resolve www.yahoo.com it started adding known domains suffixes to it.
You should see www.yahoo.com.SUBDOMAIN.MYDOMAIN.COM, www.yahoo.com.MYDOMAIN.COM and www.yahoo.com.COM
When all works correctly (network and DNS server) this should not be a problem.
I haven't, but the scenario that comes to mind is that perhaps your systems are trying to determine whether to append the domain suffix by looking to see whether they can retrieve NS records for the .com TLD, and then intermittent network failures are causing false negatives on that check.
It could also be a DHCP/DNS issue. Part of the DHCP reply can include information about the search domain. Typically, the PC would try to guess to see if it needed to append the search domain before sending the query up to the DNS server. Might warrant an investigation as well.
There are still a lot of possibilities, so see if you can narrow it down.
You need to isolate the problem to a specific application on a specific system.
You could have a misconfigured DHCP server (you might be able to compare the lease log on the DHCP server with windows of activity). You might have a badly behaving application, which composes calls to the resolver without an FQDN (which should end in a period). If your first query fails (lets say the DNS request times out), then the resolver might cause a second query where treated your string as a PQDN and literalized it into the longer FQDN you see.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am looking for a reliable service that has a good database of the hosting providers vs domain names. I guess some of the domains that are privately hosted cannot be resolved to a definite hosting provider (maybe just to ISP).
I have used webhosting.info (their power whois and advanced whois) which used to give hosting information(not sure) earlier but not anymore. I looked at domaintools.com but couldnt find anything like that in their tools.
I guess I could do a reverse IP on a domain and go to arin.net and get the org name.
But looking for a free (or paid service) that can do bulk lookups or any reverse dns tools that you recommend or use.
Majority of websites use DNS server provided by hosting company, but you can use any other DNS server to resolve your domain names. So looking up by IP address allocation data is the best method.
Here is a site which does it for you:
http://www.whoishostingthis.com/
If you have access to a Linux machine, you can use jwhois on the IP address. So you'd need to resolve the hostname to IP address (which you could do using ping, if you wanted to use a shell-script) and then jwhois the IP address, which will (usually) automatically look it up in ARIN / APNIC / RIPE as appropriate. It's not 100% accurate, but it almost always works.
Alternatively, you can buy access to the GeoIP database.
I go to www.domaintools.com and enter the domain name in the Whois lookup.
When their Whois record shows up, look at the Name Server. It tells you who the hosting company is, and as an added bonus, also tells you the number of domains at that host.
I don't know if they have any bulk services though. I've only needed one at a time lookups.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I know how to set up a local webserver using xampp on windows... I enter my alias and target on the hosts file (c:\windows\system32\drivers\etc\hosts) and then add a respective entry on my apache vhosts config file. This way, assuming that my webserver is listening to port 80, I can for example map example.com to my local webserver.
I've always entered the whole domain name (that is e.g. example.com) in my hosts file and any requests on that name would be directed to localhost.
Now I was wondering if there's a way to only forward example.com on a certain port (for example only example.com:8080) to the local webserver, and leave example.com (on the default port 80) alone, so that it would still go to my live production website.
As far as I understand this might not be possible using only the hosts file (I tried adding the port :8080 to my domain names - didn't seem work ;-) )...
I really don't know much on this topic so any ideas, insights, links, reading material, tools are welcome.
Edit:
Arnout's reply answers the question I've asked above but doesn't solve my actual problem. Rerouting example.com:8080 to localhost:80 does work and if I access example.com it loads up the frontpage of my local version, but all links on that page of course don't know about the port number and therefore point to the production version... The actual solution to my problem seems to be to bite into the sour apple and fix my application (following Rob's suggestion) and remove all hardcoded urls, so that it works on any domain...
Internet Junkbuster (a proxy server) can do this using its forwarding functionality.
Just add a line like
example.com:8080 localhost:80 . .
to sforward.ini, and uncomment the forwardfile line in junkbstr.ini. Now configure your browser to use a proxyserver running at port 8000 of localhost, and you're set.
I'm sure other proxy servers have a similar feature — I just like Junkbuster since it's a simple standalone executable.
You are playing in the area of domain name services (DNS). Technically, with an advanced DNS configuration (which can include remapping ports), what you propose is possible and it is done routinely on the Internet. However, it is unlikely that you would want to go to that much trouble and expense locally.
On the other hand, I suspect that your real issue can be addressed more easily. Why would you want to have "example.com" resolve to your local web server? You can already reference your local web server as "localhost", as "127.0.0.1", and via its assigned machine name "workstation-x".
The only reason that I can think of, and that I have seen, for wanting to reference your local web server with the same host name as your production web server is due to hard-coding the server host name into your links within your application's web pages. If that is the case here, the answer is simple: don't! You should ALWAYS implement your web applications so that they reference everything (other pages, CSS, JS, images, etc.) relative to the deployed server. If you deploy across multiple servers, then your references must be absolute based on configurable server host names. This is easy to do, and there is no reason not to do it.
If this is not the case, then please explain what you are trying to achieve and what motivates you to try.
EDIT: Since you have confirmed my guess that the problem is hard-coded references to the production host name in the web pages, let me simply add that I have ALWAYS, WITHOUT EXCEPTION, found that it is cheaper to fix the real problem than to accumulate workarounds (such as your attempt to remap ports). I have never encountered an author who has argued the opposite.
Fixing the pages should be little harder than a global search & replace, especially with a decent text editor. Even writing a simple script to change the source files would be vastly cheaper and easier than your attempts at a workaround.
Regardless, best wishes to you, and let us know how it turned out.
Can you confirm if 8080 port is listening on webserver? use the command "netstat -na" to see if the port 8080 is listening.
Did you add 8080 port on apache config file as the same as the default 80 port?
Once you add port 8080 on apache config file to make it listen and double check if 8080 port is listening on webserver, then you will be able to access the page using port 8080. like http://mytestwebserver:8080/index.html or something like this....