LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   intranet works, internet doesn't (https://www.linuxquestions.org/questions/linux-networking-3/intranet-works-internet-doesnt-764441/)

RandomZero 10-25-2009 11:14 PM

intranet works, internet doesn't
 
Weird problem, but it happens.

interfaces file =
Code:

#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.15
network 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameserver 4.2.2.2
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

Last night I had this same issue. I'm connected using SSH, even VNC works, but I can't route to the internet. Both boxes are connected to the same router (Shitty Netgear WPN824v2 wireless router), obviously it's working as I am able to post this. I can access the network shares from one pc to another, I can access the router website.. But I can't connect to the internet. iptables hasn't been configured apart from the default settings so I don't think that would be an issue..

Any reason why this wouldn't be working?

I do have 3 NIC's (Onboard = eth0, ethernet NIC and wireless NIC are both installed in the pc but not set up yet)

kbp 10-25-2009 11:54 PM

Is that network correct ? ... I would have thought it should be 192.168.1.0 ..

cheers

RandomZero 10-25-2009 11:59 PM

I'm not entirely sure what "network" is supposed to be.. I was just googling possible configs and one seemed to have it in there so I threw it in mine.

I did however just change it
currently reads:
Code:

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.15
        network 192.168.1.0
        netmask 255.255.255.0
        gateway 192.168.1.1


Also, seems to be just a DNS issue.
ping 4.2.2.2 works, but ping google.com does not. Which would explain why intranet works, and internet does not.
I know the dns server I had specified works, as I've used the same ones for a good 5 years now (even on this box..)

kbp 10-26-2009 12:10 AM

Can you perform a 'netstat -nr' and post the output ? .. that will show us the routing table

Is the dns server yours or an ISP one ?

cheers

RandomZero 10-26-2009 12:13 AM

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
192.168.1.0    0.0.0.0        255.255.255.0  U        0 0          0 eth0
0.0.0.0        192.168.1.1    0.0.0.0        UG        0 0          0 eth0


kbp 10-26-2009 12:19 AM

Looks good.. can you query any other dns servers ?

RandomZero 10-26-2009 12:21 AM

ServU:~# ping google.com
ping: unknown host google.com
ServU:~# ping linuxquestions.org
ping: unknown host linuxquestions.org
ServU:~# ping yahoo.com
ping: unknown host yahoo.com
ServU:~# ping fox.com
ping: unknown host fox.com


:(



Just noticed as I was rebooting the pc, the winbind daemon is failing to start. Quick google search shows it's used for resolving names from NT servers.. Would this have any affect on the DNS?

kbp 10-26-2009 12:26 AM

Is there another dns server you can query other than 4.2.2.2 ?

eg. 'dig @anotherdnsserver www.google.com'

RandomZero 10-26-2009 12:29 AM

ping 4.2.2.4 google.com
ping: unknown host google.com

kbp 10-26-2009 12:32 AM

I don't think thats a valid command mate... try 'dig @4.2.2.3 www.google.com'

RandomZero 10-26-2009 12:35 AM

oh snap
Code:

dig @4.2.2.3 www.google.com

; <<>> DiG 9.5.1-P3 <<>> @4.2.2.3 www.google.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59088
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
www.google.com.        35981  IN      CNAME  www.l.google.com.
www.l.google.com.      106    IN      A      64.233.169.103
www.l.google.com.      106    IN      A      64.233.169.104
www.l.google.com.      106    IN      A      64.233.169.105
www.l.google.com.      106    IN      A      64.233.169.106
www.l.google.com.      106    IN      A      64.233.169.147
www.l.google.com.      106    IN      A      64.233.169.99

;; Query time: 50 msec
;; SERVER: 4.2.2.3#53(4.2.2.3)
;; WHEN: Mon Oct 26 01:33:56 2009
;; MSG SIZE  rcvd: 148

ping 4.2.2.3 works, so I figured it'd work for a url as well.

But either way, even with this new development, I still cannot route to websites..

kbp 10-26-2009 12:40 AM

That server seems to be working so change your network config accordingly then retest net access

RandomZero 10-26-2009 12:50 AM

Used "dns-nameserver 4.2.2.1 4.2.2.2 4.2.2.3 4.2.2.4" for good measure
Then "/etc/init.d/networking restart"

Samething, still can't route :(

kbp 10-26-2009 01:05 AM

Try testing them individually with dig as before and remove any that don't respond from your network config. After that, if you can successfully perform name resolution at the command line try this:

'wget http://www.google.com/'

RandomZero 10-26-2009 01:08 AM

Tried them all, they all work.

Code:

ServU:~# wget http://www.google.com/
--2009-10-26 02:07:46--  http://www.google.com/
Resolving www.google.com... failed: Name or service not known.
wget: unable to resolve host address `www.google.com'



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