Jump to content
Old threads will finally start getting archived ×

Jamie0

New Members
  • Posts

    7
  • Joined

  • Last visited

Jamie0's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey kicken, thanks so much. I found the answer to my own question. I have Apache running on a non-default port After editing the port number accordingly, you code is working as expected Thanks again, Cheers,.
  2. Hey, Kicken, thanks very much for your help. Much appreciated. Seems like I may be getting there... This is what I've done so far: 1. On my DNS server, I’ve created a zone file that maps ‘test.fakedomain’ to my DNS server’s address (address=/test.fakedomain/66.76.76.11) 2. I’ve changed my network adapter’s DNS IP to 66.76.76.11 3. To test whether I’m using my DNS server’s resolves, I’ve nslookup’d and pinged ‘test.fakedomain’. Both results are as expected: C:\Users\test_user>nslookup test.fakedomain Server: my.dns.server Address: 66.76.76.11 Name: test.fakedomain Address: 66.76.76.11 C:\Users\test_user>ping test.fakedomain Pinging test.fakedomain [66.76.76.11] with 32 bytes of data: Reply from 66.76.76.11: bytes=32 time=145ms TTL=50 Blah blah blah… 4. I’m serving ‘dnstest.php’ via Apache from my default site <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1 transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <div id="results">Testing...</div> <script type="text/javascript"> var timer = setTimeout(function(){ document.getElementById('results').innerHTML = 'Failed!'; }, 6000); </script> <script type="text/javascript" src="http://test.fakedomain/test.js"></script> <body> </body> </html> 5. And on the same directory, I have ‘test.js’ // JavaScript Document document.getElementById('results').innerHTML = 'Success!'; clearTimeout(timer); 6. On my browser, I go to http://66.76.76.11/dnstest.php and I get the ‘Testing…’ message for 6 seconds, then it turns into ‘Failed’ when I should get the ‘Success’ message… 7. BTW, pointing my browser to http://66.76.76.11/test.js apache shows the raw code Do note that for the sake of privacy, I've changed the server's address. Could you please tell me what am I doing wrong?
  3. Thanks anyways, Jazzman. I was originally thinking (as per my previous post) to forward a domain on my DNS server into a fake IP address, and then let the client click on that link. Two scenarios will happen. "If the client reaches the 'real' address" then he is still using his ISP's DNS. "If he gets forwarded to the fake IP address", I can be sure he is using my DNS server as a resolver. Problem seems to be, as per kicken's post above, that no matter what, the DNS resolve will be done at the server's end... I'm not double guessing kicken, but, just but, how or when does a client actually uses his own DNS settings? I mean, if I click on an URL on a webpage, isn't that the equivalent of me typing that address into my browser, hence using whatever DNS server I have set up on my end? Just thinking aloud...
  4. Hey Jazzman, thanks for the reply. The whole story is on my original post above. In case I wasn't clear (sorry, English is my third language!) I'm trying to find an easy way to let the users of my DNS server know whether they have changed their DNS settings correctly, Ideally, after they change their DNS settings on their PC, they could click a link and know right away whether they are using my DNS server or still using their ISP's. Something like this comes to mind http://news.cnet.com/8301-13554_3-10025202-33.html. In case they aren't, then I can redirect them to a help page, where I can show them how to flush their DNS cache, browser cookies, etc. Thanks!
  5. Hey Jazzman, thanks for the reply. Yes, I understand that they do a lot of load balancing, specially if you log from different regions. Going back to the previous reply by kicken, however, wouldn't we still face the same problem that any webpage code would be run server side?
  6. Thanks so much for the reply, kicken. The following quote is definitely an eye opener: I guess can stop wasting my time following the previous OP's idea an work on some client side JS. If you don't mind elaborating a bit more on your approach. My idea was to use Dnsmasq to resolve a given domain, i.e. fasebuk.com (LOL) to 46.46.46.46. For obvious reasons, however, I have no access to that server, so I have no means to upload a JS file. Will a dormant domain I have at GoDaddy do it? And just point to if 'from my custom dns resolve only' deleting all its A records at Godaddy so no other DNS server can resolve to it? Sorry about the newbiness, but I must admit that my coding knowledge are quite poor, Thanks again,
  7. Hi everyone, long time reader, first time poster here. I've been banging my head against the wall for the past few hours, trying to figure out a ways of knowing (and displaying on a webpage) whether my clients have setup correctly their DNS addresses to my ‘remote’ DNS server or not, instead of using their default DNS server provided by their ISP. The closest I've gotten to answer my question is on this post: http://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/ $ip = gethostbyname('www.facebook.com'); if ($ip == '46.46.46.46') { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '69.171.229.25') { //this is true ns lookup echo "Smart DNS Is Not Set UP"; } Seems to me like the OP is trying to achieve the same results I am. Modifying an entry on his DNS server (probably) to point to a different facebook IP address. Here's where the tricky part is in play. Please follow me briefly: 1. I'm pointing www.facebook.com to 46.46.46.46 on my 'remote' dns server. 2. Using the above code, I've uploaded a testdns.php to my 'remote' dns server. 3. If I use my ISP's DNS server on my PC and do an nslookup on www.facebook.com, I get 69.171.229.25, good. I then switch my PC's DNS server addresses to my 'remote' server address in question, I do another nslookup on www.facebook.com and I get 46.46.46.46. Good. Up to here, everything works as expected. 4. When I try to view this on the uploaded webpage, however, it always resolves to the real facebook address, and get the "Smart DNS Is Not Set UP" message, no matter whether I use my ISP's DNS addresses (as expected) or my 'remote' DNS server's addresses (here's where it's failing). 5. I'm only using IP4, BTW. I've tried to just echoing the output of $ip = gethostbyname('www.facebook.com'); echo $ip; But no matter what DNS server address I use on my PC, I always get the 'real' address and not the one I'm pointing to on my DNS server. Please do note that if I manually do an nslookup on a cmd prompt on my PC, it resolves correctly; it's only the above code that always resolves to the true address instead of the one I'm pointing on my DNS server. Any help will certainly be much appreciated, Thanks, Hi everyone, long time reader, first time poster here. I've been banging my head against the wall for the past few hours, trying to figure out a ways of knowing (and displaying on a webpage) whether my clients have setup correctly their DNS addresses to my ‘remote’ DNS server or not, instead of using their default DNS server provided by their ISP. The closest I've gotten to answer my question is on this post: http://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/ $ip = gethostbyname('www.facebook.com'); if ($ip == '46.46.46.46') { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '69.171.229.25') { //this is true ns lookup echo "Smart DNS Is Not Set UP"; } Seems to me like the OP is trying to achieve the same results I am. Modifying an entry on his DNS server (probably) to point to a different facebook IP address. Here's where the tricky part is in play. Please follow me briefly: 1. I'm pointing www.facebook.com to 46.46.46.46 on my 'remote' dns server. 2. Using the above code, I've uploaded a testdns.php to my 'remote' dns server. 3. If I use my ISP's DNS server on my PC and do an nslookup on www.facebook.com, I get 69.171.229.25, good. I then switch my PC's DNS server addresses to my 'remote' server address in question, I do another nslookup on www.facebook.com and I get 46.46.46.46. Good. Up to here, everything works as expected. 4. When I try to view this on the uploaded webpage, however, it always resolves to the real facebook address, and get the "Smart DNS Is Not Set UP" message, no matter whether I use my ISP's DNS addresses (as expected) or my 'remote' DNS server's addresses (here's where it's failing). 5. I'm only using IP4, BTW. I've tried to just echoing the output of $ip = gethostbyname('www.facebook.com'); echo $ip; But no matter what DNS server address I use on my PC, I always get the 'real' address and not the one I'm pointing to on my DNS server. Please do note that if I manually do an nslookup on a cmd prompt on my PC, it resolves correctly; it's only the above code that always resolves to the true address instead of the one I'm pointing on my DNS server. Any help will certainly be much appreciated, Thanks,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.