LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-14-2011, 12:27 AM   #1
TimmyTurner
LQ Newbie
 
Registered: Sep 2010
Distribution: debian
Posts: 16

Rep: Reputation: 0
Internet works on windows fine, but doesn't work in linux for some websites


Hi all
Here I've an amazing and odd problem and I don't understand it!
I have Debian 6 and a Windows XP on my PC, and Debian sid and opensuse 11.3 and Windows 7 on my netbook.
Several days ago, I couldn't access some websites through linux anymore, but it works fine in windows and I tested in 2 devices (my PC and my netbook).
I found out that it is only about some websites! I mean some of them are accessible and some other are not!
It's really odd and strange.
I have a TP-Link TP-W8901G Wireless ADSL Modem Router and was set for PPPoE mode. I changed that to Bridge mode. This time all websites are accessible in linux but internet is very slow. I even tried using a D-Link DSL322T ADSL Modem, but I got same results.
It's really amazing because I can ping websites like google.com but I can't open them while modem works on PPPoE.
several same problems are reported since last week. Is ISP responsible for this problem? Because I really can't understand why things work fine in Windows but not in linux.
I'm sure about configurations. I tried a live disc and didn't work too

Last edited by TimmyTurner; 02-14-2011 at 12:30 AM.
 
Old 02-14-2011, 07:58 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064
That sounds an awful lot like a DNS server problem; take a look at /etc/resolv.conf and, if it's empty, add the following:
Code:
sudo vi /etc/resolv.conf
<insert these three lines>
search com
nameserver 8.8.8.8
nameserver 8.8.4.4
<save and exit>
Those are Google public DNS server addresses (see http://code.google.com/speed/public-dns/docs/using.html. You could instead use the DNS server addresses your ISP should have provided you; two is fine, three is maximum (on most systems), more than three is useless.

If /etc/resolv.conf was empty and you added the above, you should immediately see things go-fast.

If you're using DHCP on your servers, look for your "inet1.conf" (or similar name; I don't know what that is in Debian); it contains the settings for your network interface. Somewhere there will be a pattern something like this:
Code:
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
DHCP_KEEPRESOLV[4]="yes"       # If you don't want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
You probably do not want to un-comment any of the setting except DHCP_KEEPRESOLV (as shown above); un-commenting that will keep the DNS server setting in /etc/resolv.conf and won't allow DHCP to overwrite them. Leave the rest alone (unless you set them on purpose previously).

PPPoE is one method for connecting your modem to your ISP (and, your ISP should have told you what method to use) and really doesn't have much of anything to do with this sort of thing. If that's what your ISP said to use, that's what you use (and vice-versa if told some other method).

Windows, typically, is connected with DHCP and ISP-provided DNS server address(es) are force-fed to Windows upon connection. Your router is most likely running a DHCP server, thus "leasing" a connection to Windows and setting the DNS server address(es).

If you're using fixed-IP addressing for your servers, the above entries and DHCP_KEEPRESOLV will also "fix" much of the problem; you have to have DNS server addresses to be able to find things on the Internet. Many routers provide DNS services but they tend to... oh, time-out might be the best way to say it -- they'll work for some period of time and then cease to respond (don't know why, just know that it happens). Keeping DNS server entries in /etc/resolv.conf generally make life better.

Hope this helps some.
 
1 members found this post helpful.
Old 02-14-2011, 11:39 AM   #3
TimmyTurner
LQ Newbie
 
Registered: Sep 2010
Distribution: debian
Posts: 16

Original Poster
Rep: Reputation: 0
Greatest answer I've got in forums during my life. You're a god guy
 
Old 02-14-2011, 12:12 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,466

Rep: Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860
In which case I hope you enhanced @tronayne reputation ... (click on "rep" under the name)
 
Old 02-15-2011, 04:08 AM   #5
TimmyTurner
LQ Newbie
 
Registered: Sep 2010
Distribution: debian
Posts: 16

Original Poster
Rep: Reputation: 0
Dear tronayne, you explained your idea beautifully and it was so nice. But it couldn't solve the problem :'-(
 
Old 02-15-2011, 04:30 AM   #6
TimmyTurner
LQ Newbie
 
Registered: Sep 2010
Distribution: debian
Posts: 16

Original Poster
Rep: Reputation: 0
In technotux forums I got this answer:
echo 0 > /proc/sys/net/ipv4/tcp_timestamps

And it works right now. But what was the problem?
 
Old 02-15-2011, 04:57 AM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064
There is one (really goofy) thing I remember having to do every so often with an ADSL modem. Every once in a while things would get painfully slow (well, not as painful as dial-up, but slow). The solution was to turn off the modem (with its power switch) and unplug the power supply line from the modem jack for, oh, something like three minutes then plug the jack back in and turn it back on. That would make it reconnect, get a new IP address and buzz along fat, dumb and happy. This usually happened when there was a big rainstorm, windstorm or some sort of atmospheric thing that messed up the telephone lines one way or the other (and every once in a while just for the heck of it apparently; sunspots, moonspots, who knows spots). Maybe give that a shot -- disconnect the power from the modem(s) and let 'em sit for a few minutes. I seem to recall being told to actually pull the power plug from the modem, not just pull the transformer from the wall plug (again, who knows) and that was effective.

Maybe?

Hope this helps some.
 
Old 02-15-2011, 05:10 AM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064
Quote:
Originally Posted by TimmyTurner View Post
In technotux forums I got this answer:
echo 0 > /proc/sys/net/ipv4/tcp_timestamps

And it works right now. But what was the problem?
Well, there's one I've never heard of. Great.

Did a little searching around and found this http://www.saintcorporation.com/cgi-...ct_color=&tag=. One of the points in the article is
Quote:
The Problem

TCP timestamps are enabled on the remote host. This could allow a remote attacker to estimate the amount of time since the remote host was last booted.

Resolution

TCP timestamps are generally only useful for testing, and support for them should be disabled if not needed.

To disable TCP timestamps on Linux, add the following line to the /etc/sysctl.conf file:

net.ipv4.tcp_timestamps = 0
Dang. Learn something new every so often.
 
Old 02-15-2011, 10:22 AM   #9
TimmyTurner
LQ Newbie
 
Registered: Sep 2010
Distribution: debian
Posts: 16

Original Poster
Rep: Reputation: 0
That was beautiful. But, can't it cause reducing security and disabling my privacy in Internet? (sorry for this silly question, I'm new in TCP/IP stuffs)
 
Old 02-15-2011, 11:59 AM   #10
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064Reputation: 1064
Well, on my servers there is nothing in /proc/sys/net/ipv4/tcp_timestamps; it's just an empty file. Too, I do not have a /etc/sysctl.conf file. The above
Quote:
TCP timestamps are generally only useful for testing, and support for them should be disabled if not needed.
tells me that (1) I don't want it, (2) I don't need it, and (3) if I've got it I want to turn it off. I'd simply create /etc/sysctl.conf and add net.ipv4.tcp_timestamps = 0 to it (as suggested above) to enahnce security.

If that file already exists in /etc/sysctl.conf with an enabling entry (the zero would be a one), I'd change it zero.

Over the years there have been a few thing pop up (like testing turned on in basic utilities, leaving a "back door" open, that an administrator was supposed to know to turn off); I kind of think this may be one of those.

Hope this helps some.
 
Old 02-27-2011, 10:45 AM   #11
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Quote:
TCP timestamps are generally only useful for testing, and support for them should be disabled if not needed.
That is simply false, as explained in RFC1323, which is cited by that website.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Websites don't display properly (if at all) in Linux, but fine in Windows kamchatka4987 Linux - General 17 04-21-2010 03:01 PM
won't work WITHOUT wep, works fine with....eh? exactly darrell256 Linux - Wireless Networking 4 08-02-2006 01:04 AM
can't ping localhost, Internet works fine drowstar Linux - Networking 5 01-04-2005 03:09 PM
No internet access in linux, works fine in windows c0uchm0nster Linux - Networking 8 01-29-2004 06:45 AM
printer works fine in windows but is slow under linux nef Linux - Hardware 4 09-28-2003 02:39 PM

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

All times are GMT -5. The time now is 01:52 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