LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2007, 01:44 PM   #1
serg.kr
LQ Newbie
 
Registered: Jul 2007
Distribution: Debian
Posts: 15

Rep: Reputation: 2
How Browsers Work


Hello,

I have a quick question about how browsers work. When they establish connections to servers, do they connect to a hostname such as "www.google.com" or "www.linuxquestions.org", or do they perform a quick DNS query and then try to connect directly to "216.239.51.99" or "64.179.4.146"?

Here is why I'm asking. I'm currently in a hotel that has wireless internet. Unfortunately, their service could be summed up in a word as irritating. Every time I try to connect anywhere, their router responds with a "HTTP 302 Moved Temporarily" response, and it redirects the connection to a little toolbar application that they created "for my convenience". Do not want!

I went into telnet and tried connection to google.com directly:

Code:
serg@cherie:~$ telnet www.google.com 80
Trying 216.239.51.104...
Connected to www.l.google.com.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 302 Moved Temporarily
Server: squid/2.5.STABLE14
Date: Fri, 17 Aug 2007 18:37:58 GMT
Content-Length: 0
Location: http://12.146.233.66/superclick/popup.php?popup=4&url=http%3A%2F%2F216.239.51.104%2F

Connection closed by foreign host.
Then I ran an nslookup query for www.google.com and found its IP address to be 216.239.51.99. I ran telnet with that instead:
Code:
serg@cherie:~$ telnet 216.239.51.99 80
Trying 216.239.51.99...
Connected to 216.239.51.99.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 200 OK
Cache-Control: private
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=bab640079fe60c51:TM=1187375982:LM=1187375982:S=lbm97dz6r-QPhDPz; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Server: GWS/2.1
Date: Fri, 17 Aug 2007 18:39:42 GMT
X-Cache: MISS from localhost
Connection: close

<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif}
.h{font-size:20px}
.h{color:#3366cc}
.q{color:#00c}
.ts td{padding:0}.ts{border-collapse:collapse}--></style>
<script>
<!--
window.google={kEI:"buvFRv6NGYHWqwLZqrSiBw",kEXPI:"17259",kHL:"en"};function sf(){document.f.q.focus();}
// -->
</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="sf();if(document.images){new Image().src='/images/nav_logo3.png'}" topmargin=3 marginheight=3><div align=right id=guser style="font-size:84%;padding:0 0 4px" width=100%><nobr><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.com/ig%3Fhl%3Den&usg=AFQjCNEj49wK5T88bDwGcaZsW52jiYwJwg">iGoogle</a></nobr></div><center><br clear=all id=lgpd><table cellpadding=0 cellspacing=0 border=0><tr><td align=right valign=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td><td valign=bottom><img src=images/hp1.gif width=50 height=78 alt=""></td><td valign=bottom><img src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=h align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif width=50 height=32 alt=""></td><td valign=top class=h><font color=#666666 style=font-size:16px><b>English</b></font></td></tr></table><br><form action="/search" name=f><style>#lgpd{display:none}</style><script defer><!--
//-->
</script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web</b>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://images.google.com/imghp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wi">Images</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://groups.google.com/grphp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wg">Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://news.google.com/nwshp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wn">News</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q href="http://scholar.google.com/schhp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=ws">Scholar</a>&nbsp;&nbsp;&nbsp;&nbsp;<b><a href="/intl/en/options/" class=q>more&nbsp;&raquo;</a></b></font></td></tr></table><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td align=center nowrap><input name=hl type=hidden value=en><input type=hidden name=ie value="ISO-8859-1"><input maxlength=2048 name=q size=55 title="Google Search" value=""><br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"></td><td nowrap width=25%><font size=-2>&nbsp;&nbsp;<a href=/advanced_search?hl=en>Advanced Search</a><br>&nbsp;&nbsp;<a href=/preferences?hl=en>Preferences</a><br>&nbsp;&nbsp;<a href=/language_tools?hl=en>Language Tools</a></font></td></tr></table></form><br><br><font size=-1><a href="/intl/en/ads/">Advertising&nbsp;Programs</a> - <a href="/services/">Business Solutions</a> - <a href="/intl/en/about.html">About Google</a> - <a href=http://www.google.com/ncr>Go to Google.com</a></font><p><font size=-2>&copy;2007 Google</font></p></center></body></html>Connection closed by foreign host.
In summary, if I do the name resolution myself (manually), I get to browse the Internet without that annoying "toolbar" of theirs. Is there any way that I could configure Firefox to perform the DNS queries using something like nslookup instead of relying on the router? Or is there perhaps another way I could avoid having to browse with that "toolbar" of theirs?
 
Old 08-17-2007, 02:12 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Don't use their DNS, which will avoid the intercept and redirect. You can use OpenDNS servers instead.
 
Old 08-17-2007, 02:19 PM   #3
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
Server: squid/2.5.STABLE14
Their using a proxy.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure WLAN on ubuntu, now browsers dont work. tidiman07 Linux - Wireless Networking 7 04-09-2007 09:26 AM
LXer: Adapt Web Apps to Work with Multiple Browsers LXer Syndicated Linux News 0 11-29-2006 06:54 AM
Browsers don't work fstreed SUSE / openSUSE 10 06-16-2005 04:46 PM
RealPlayer 10 won't work with Slackware 10.1 browsers! m_rizvan_m Slackware 12 05-10-2005 11:15 AM
browsers simon Linux - Software 0 07-26-2001 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration