Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-14-2011, 12:27 AM
|
#1
|
LQ Newbie
Registered: Sep 2010
Distribution: debian
Posts: 16
Rep:
|
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.
|
|
|
02-14-2011, 07:58 AM
|
#2
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
02-14-2011, 11:39 AM
|
#3
|
LQ Newbie
Registered: Sep 2010
Distribution: debian
Posts: 16
Original Poster
Rep:
|
Greatest answer I've got in forums during my life. You're a god guy
|
|
|
02-14-2011, 12:12 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,238
|
In which case I hope you enhanced @tronayne reputation ... (click on "rep" under the name)
|
|
|
02-15-2011, 04:08 AM
|
#5
|
LQ Newbie
Registered: Sep 2010
Distribution: debian
Posts: 16
Original Poster
Rep:
|
Dear tronayne, you explained your idea beautifully and it was so nice. But it couldn't solve the problem :'-(
|
|
|
02-15-2011, 04:30 AM
|
#6
|
LQ Newbie
Registered: Sep 2010
Distribution: debian
Posts: 16
Original Poster
Rep:
|
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?
|
|
|
02-15-2011, 04:57 AM
|
#7
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
|
|
02-15-2011, 05:10 AM
|
#8
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
Quote:
Originally Posted by TimmyTurner
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.
|
|
|
02-15-2011, 10:22 AM
|
#9
|
LQ Newbie
Registered: Sep 2010
Distribution: debian
Posts: 16
Original Poster
Rep:
|
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)
|
|
|
02-15-2011, 11:59 AM
|
#10
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
|
|
02-27-2011, 10:45 AM
|
#11
|
Member
Registered: Mar 2009
Posts: 249
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|