LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Connection was reset (https://www.linuxquestions.org/questions/linux-networking-3/connection-was-reset-891805/)

hedron 07-14-2011 10:17 PM

Connection was reset
 
Skip to post 15 as the issue described in this post is no longer relevant.

----------------

I keep getting a "Connection was reset" error on various webpages. I don't think it's on the server side because I get it on newegg.com and other sites like that. Most websites work fine. Plus, it acts a lot more sluggish when I'm connected to my linux box.

I'm convinced it has something to do with the way my server is configured. I'm typing this on a Win7 machine connected to a switch connected to multiple computers, one of which is my linux box which is connected to my cable modem. I have two ethernet adapters on my linux box.

I'm convinced it has to do with dnsmasq, so that's why I'm posting my dnsmasq.conf file.

Code:

domain-needed
bogus-priv
#strict-order
cache-size=2048
log-async=10
#no-resolv
#no-poll
#server=208.67.222.222
#server=208.67.220.220
server=216.139.147.17
server=216.139.141.17
interface=eth1
except-interface=eth0
no-dhcp-interface=eth0
bind-interfaces
expand-hosts
dhcp-option=3,<ip address>
log-queries
log-dhcp
dhcp-range=<ip range>,12h
dhcp-host=<mac address>,<ip address>,<hostname>
dhcp-host=<mac address>,<ip address>,<hostname>
dhcp-host=<mac address>,<ip address>,<hostname>

Maybe it has nothing to do with dnsmasq. Maybe I should just use dhcpd instead? I don't think dnsmasq is doing what I want it to do anyway.

It is not sluggish and there is no "connection was reset" error when I connect to the internet directly from my Win7 box.

Any ideas on why I'm getting a connection was reset error? Any clues as to why it's sluggish?

ButterflyMelissa 07-15-2011 04:00 PM

How about increasing the MTU? The syntax is:

Quote:

ifconfig ${Interface} mtu ${SIZE} up
as an example:

Quote:

ifconfig eth1 mtu 9000 up
To be changed permanently in the networks settings, or /etc/rc.local, add (perhaps) this line:

Quote:

/sbin/ifconfig eth1 mtu 9000 up
...mileage may vary, do some reading first, okay? ;)

Luck

Thor

hedron 07-15-2011 09:52 PM

Hmmm... The issue isn't happening with Internet Explorer ... interesting...

Thanks your response though. :D

repo 07-16-2011 03:28 AM

Did you disabled ipv6 in firefox?

Kind regards

hedron 07-21-2011 10:38 AM

I have never messed with the ip6 settings. Doesn't everything use ip4 anyway?

I'm using Opera now, but I'm having issues with https and yahoo finance, but everything else is OK. But, it's weird it's only for specific sites. If it was just yahoo finance alone, I would think that there was just heavy traffic, but for days on end? Also, neweggs https login is slow, but my banks https login is fine. Yahoo seems to be slow all around, except for the news section. When I say slow, I mean unusable slow. Like, slower than dial up.

Although, I just synced both adapters MTU to 7200 and now newegg is fine. I think. For now anyway... But yahoo is still a mess. Maybe they're just having a bad week?

OK, newegg is acting up again. It usually gets stuck on "sending request" as if it is having troubling hearing a response.

hedron 07-23-2011 08:14 AM

I went to speedtest.net and download was 9.79Mbps, which is normal for cable connection, I think? But what was wrong was my upload speed was 0.4 Mbps. I don't know what's causing this but it's not Linux since I'm directly connected to the internet on a Win7 box.

hedron 07-24-2011 01:05 AM

Is it possible that my ISP is throttling my bandwidth?

repo 07-24-2011 04:23 AM

Quote:

I went to speedtest.net and download was 9.79Mbps, which is normal for cable connection, I think? But what was wrong was my upload speed was 0.4 Mbps
Seems normal to me.
What are the specifications from your connection?
download/upload
Quote:

Is it possible that my ISP is throttling my bandwidth?
Again what are the specifications.
And why don't you ask them?

Kind regards

hedron 08-03-2011 11:26 PM

Yea, they're not throttling my bandwidth.

I'm convinced this is a dns/caching issue or some kind of issue with ssl/tls or poorly run proxy. It would seem that I don't have any control over.

I did mess with openssl a bit. Just installing an updated version then uninstalling it. With the default version still there.

I don't know if anyone is familiar with opendns.com. I signed up with that, but undid all my changes because I didn't need it.

Sometimes pages look like this: http://i.imgur.com/SZrBX.jpg

Sometimes I get "connection closed by remote server" in opera or "the connection was reset" in firefox or "Internet Explorer cannot display the webpage" with ie or "This webpage is not available" with google chrome.

It's pretty random and intermittent, but mostly it's finance.yahoo.com and banking/credit card websites. For instance, I couldn't log onto usaa.com for an hour this morning, but then suddenly it decided to work again. Right now I can't log onto discovercard.com, but usaa.com is fine.

hedron 08-04-2011 11:40 AM

Well, I couldn't connect to my bank this morning, so I disconnected my slackware server and connected my windows box directly to the internet and it works fine. So, it's got to be some setting on my slackbox. I really do not have the faintest idea of what it could be. I'm only guessing a dns/proxy issue because that's what google said it was. And google knows all. ;) Is there some command that would help me trouble shoot this? Or some log file I could post?

hedron 08-05-2011 09:10 PM

Anyone have even a guess? This is driving me crazy.

hedron 08-07-2011 12:28 PM

OK, I commented out a few things in my dnsmasq.conf and now it's a little better, but it's still acting funny.

Code:

#domain-needed
bogus-priv
#strict-order
#cache-size=2048
#log-async=10
#no-resolv
#no-poll
#no-negcache
#no-hosts
interface=eth1
#listen-address=127.0.0.1
except-interface=eth0
no-dhcp-interface=eth0
#bind-interfaces
#expand-hosts
log-queries
log-dhcp
dhcp-range=<ip range>,12h

Where does dnsmasq log to, anyway?

hedron 08-07-2011 11:11 PM

OK, I set up dhcpd and turned off dnsmasq. And it resulted in the same exact behaviour.

I don't get it. All I did was upgrade from slack64 13.1 to 13.37. Same config files. Well, except that I did something with sysconf or some command similar to that with ip forwarding that I didn't do this time. I think it was like sysctl ipforwarding=1 or whatever command does that. But, cat /proc/blah/blah/ipforwarding is 1 already.

OK, my browser sends a request out to a website, but then does not receive an answer. But the website is working fine. So, it must not send the information to begin with. Like, my browser requests some data, but my slackbox doesn't know how to act on that request so it just stalls. I guess the thing would be to find out exactly what data my slackbox is hanging onto. I wouldn't know how to do that though. That might provide a clue as to why it's stalling.

hedron 08-09-2011 01:21 PM

OK, so I reinstalled the OS and the thing acting worse than before. I should just buy a router and a nas box... I should never have upgrade, everything was working perfectly...

hedron 08-09-2011 07:55 PM

What's wrong with these files:

dhcpd.conf

Code:

ddns-update-style interim;
ignore client-updates;
lease-file-name "/var/log/dhcpd/dhcpd.leases";
#authoritative;
default-lease-time 86400;
max-lease-time 604800;

#DHCPDARGS=eth1;

option domain-name "example.com";

option routers 10.0.0.1;
option subnet-mask 255.0.0.0;
option broadcast-address 10.255.255.255;
#option domain-name-servers 10.0.0.1;
option domain-name-servers 216.139.147.17,216.139.141.17;
#option netbios-name-servers 127.0.0.1;
       
subnet 10.0.0.0 netmask 255.0.0.0 {
        range 10.0.0.0 10.0.0.20;
#        option domain-name-servers 10.0.0.1;

host slack {
        hardware ethernet 00:26:5A:6C:6D:C7;
        fixed-address 10.0.0.1;
}

host win7 {
        hardware ethernet 6C:F0:49:52:25:D1;
        fixed-address 10.0.0.20;
}

}

dnsmasq.conf

Code:

dhcp-host=00:26:5A:6C:6D:C7,10.0.0.1,slack,24h
dhcp-host=6C:F0:49:52:25:D1,10.0.0.20,win7,24h
server=216.139.147.17
server=216.139.141.17
#server=127.0.0.1
server=10.0.0.1

domain-needed
bogus-priv
bind-interfaces
expand-hosts


interface=eth1
#interface=eth0
dhcp-range=eth1,10.0.0.0,10.0.0.20,24h
#dhcp-range=eth0,10.0.1.0,10.0.1.20,24h


rc.inet1.conf

Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
#HWADDR[0]="00:0F:B5:F9:06:14"

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="no"
MTU[1]="7200"
DHCP_HOSTNAME[1]=""
#HWADDR[1]="00:26:5A:6C:6D:C7"

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]="yes"
DHCP_HOSTNAME[2]=""
#HWADDR[2]="00:15:58:50:7D:02"

Symptoms:

I can ping google.com, ask.com, yahoo.com but not amazon.com.
Hostnames resolve on my slackbox, at least some of the time depending on how I configured my system. But not on my windows box.
I have to ping -4 win7 to get it to ping properly or it comes out looking funny like :::1: or something like that.
hostname:631 does not work on win7 but on slack it does.
I can ssh slack with putty.
nslookup usually works on slack, but doesn't fare very well on win7.


All times are GMT -5. The time now is 01:04 PM.