LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Connection was refused when attempting to .. (https://www.linuxquestions.org/questions/linux-newbie-8/connection-was-refused-when-attempting-to-430580/)

liangtp 04-01-2006 04:28 AM

Connection was refused when attempting to ..
 
Hi all,

Previously I had trouble getting the internet connection. However, I replaced my NIC with another brand (DLink) and i was able to access the internet.

However there are many sites I cannot access, such as yahoo, google, etc. The messages I keep getting are:

1. "The operation time out when attempting to connect to .... " or
2. "The connection was refused when attempting to connect to ..."

Do you have any ideas?

Thanks,

demented_are_go 04-01-2006 07:03 AM

Can you give more details? What kind of connection, are you able to connect, but not to browse? Just with what you gave, I can't really tell, it could be many things.

Emerson 04-01-2006 07:12 AM

One of my friends was in Malaysia a couple of years ago. He told me interesting stories about this country. Among other things he told internet access is somehow restricted there. He didn't know what exactly is going on - he's a movie producer, not a computer geek.
If you can access some sites then your internet connection is functional indeed. You wrote google.com is not accessible. How your nameserver resolves google.com?

google.com. 243 IN A 64.233.167.99
google.com. 243 IN A 64.233.187.99
google.com. 243 IN A 72.14.207.99

liangtp 04-02-2006 04:44 AM

With my laptop (Win XP), using the same ADSL Ethernet modem, I was able to access below:

1. www.yahoo.com
2. www.google.com
3. www.mysql.com
4. www.sun.com

However on my linux machine the result was below:

1. www.yahoo.com ("The operation time out when attempting...")
2. www.google.com ("The connection was refused when attempting ..")
3. www.mysql.com (I can access this site successfully)
4. www.sun.com (I can access this site successfully)

Emerson, you mentioned nameserver resolving google.com. How do I check this? In Malaysia, there are no restrictions to internet sites as far a I know. What other "interesting" stories you heard about?

Thanks.

Emerson 04-02-2006 07:18 AM

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.

Above is from dig manual. In most cases using it is as simple as dig www.google.com. You can also specify which server to query. See 'man dig' for details.
Code:

$ dig www.google.com

; <<>> DiG 9.3.2 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31228
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 6, ADDITIONAL: 6

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.        31434  IN      CNAME  www.l.google.com.
www.l.google.com.      243    IN      A      216.239.37.99
www.l.google.com.      243    IN      A      216.239.37.104

;; AUTHORITY SECTION:
l.google.com.          41483  IN      NS      d.l.google.com.
l.google.com.          41483  IN      NS      e.l.google.com.
l.google.com.          41483  IN      NS      g.l.google.com.
l.google.com.          41483  IN      NS      a.l.google.com.
l.google.com.          41483  IN      NS      b.l.google.com.
l.google.com.          41483  IN      NS      c.l.google.com.

;; ADDITIONAL SECTION:
a.l.google.com.        2268    IN      A      216.239.53.9
b.l.google.com.        2267    IN      A      64.233.179.9
c.l.google.com.        1536    IN      A      64.233.161.9
d.l.google.com.        2267    IN      A      64.233.183.9
e.l.google.com.        2267    IN      A      66.102.11.9
g.l.google.com.        2267    IN      A      64.233.167.9

;; Query time: 30 msec
;; SERVER: 192.168.2.254#53(192.168.2.254)
;; WHEN: Sun Apr  2 07:57:55 2006
;; MSG SIZE  rcvd: 276

You may need to specify a proxy to access internet properly. Is there a proxy set in your internet settings in Windows XP?

liangtp 04-04-2006 12:45 AM

Hi Emerson.

In Windows XP, I did not set any proxy. Just use "Direct connection to the Internet" and it worked fine. Below is the result from dig.
However, I do not know how to interpret the output.

One thing i notice, after I performed a dig www.yahoo.com and went back to the browser, yahoo did come out but only after a looong... time.

dig www.yahoo.com
; <<>> DiG 9.2.4 <<>> www.yahoo.com
; global options : printcmd
; Got answer;
; ->> HEADER <<- opcode : QUERY, status : NOERROR, id : 3728
; flags : qr rd ra; QUERY:1, ANSWER :9, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
; www.yahoo.com. IN A

;; ANSWER SECTION:
www.yahoo.com 163 IN cNAME www.yahoo.akadns.net
www.yahoo.com 42 IN A 68.142.197.74
www.yahoo.com 42 IN A 68.142.197.83
www.yahoo.com 42 IN A 68.142.197.68
www.yahoo.com 42 IN A 68.142.197.66
www.yahoo.com 42 IN A 68.142.197.75
www.yahoo.com 42 IN A 68.142.197.69
www.yahoo.com 42 IN A 68.142.197.70
www.yahoo.com 42 IN A 68.142.197.64

;; Query time: 40 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; when : Mon Apr 3 22:57:53 2006
;; MSG SIZE rcvd: 193



dig www.google.com
; <<>> DiG 9.2.4 <<>> www.google.com
; global options : printcmd
; Got answer;
; ->> HEADER <<- opcode : QUERY, status : NOERROR, id : 20191
; flags : qr rd ra; QUERY:1, ANSWER :2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
; www.google.com. IN A

;; ANSWER SECTION:
www.google.com 604322 IN cNAME www.l.google.com
www.google.com 183 IN A 64.233.189.104

;; Query time: 20 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; when : Mon Apr 3 22:59:53 2006
;; MSG SIZE rcvd: 68

Emerson 04-04-2006 09:00 AM

Well, your nameserver seems to be able to resolve it ... somehow. Next thing to try is traceroute www.google.com (must be root to use it). This will show you how much time is spent with every hop and which hosts are on route. All this is quite mysterious though ...


All times are GMT -5. The time now is 11:06 PM.