PDA

View Full Version : [ubuntu] 9.04 Server Can ping router but no Internet



cartmanx
July 6th, 2009, 04:57 PM
Hi guys, I've recently installed Ubuntu 9.04 Server , everything went well but i'm having trouble connecting to the internet. I can ping the router and the PCs in the internal network (they can connect without problems) but nothing else, it is not a DNS problem because I can't ping ANY ip address outside the network.
Here's some more information:


ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:21:27:c9:98:bc
inet addr:192.168.4.198 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::221:27ff:fec9:98bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:389 errors:0 dropped:0 overruns:0 frame:0
TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41841 (41.8 KB) TX bytes:24242 (24.2 KB)
Interrupt:22 Base address:0x4c00
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.4.254 0.0.0.0 UG 100 0 0 eth0
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
I have tried changing the MTU of the interface, setting a static IP address , removing Network-Manager,even updated the kernel, also I disabled the firewall in the router.
Please help, I'm out of ideas!

superprash2003
July 6th, 2009, 05:26 PM
post output of sudo iptables -L

cartmanx
July 6th, 2009, 05:47 PM
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

jonobr
July 6th, 2009, 06:32 PM
Whats the ip address of your default router?

What address do you ping to test the internal connection to your router?

cartmanx
July 7th, 2009, 07:39 AM
The ip address of the router is 192.168.4.254 and I can ping and even open its web interface.All the other PC-s in the network are configured with this address as a gateway, and they have no problems accessing the net.

Edit:Some more info:

tracert 208.67.222.222 -n
traceroute to 208.67.222.222 (208.67.222.222), 30 hops max, 60 byte packets
1 192.168.4.254 6.839 ms 6.962 ms 7.069 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 *^C

Somebody told that it may be a driver problem so I downloaded and installed a proprietary driver /RTL-8169/ from realtek and the problem remained. I also tried manually setting the link speed of the interface and nothing changed. I know it's illogical since I can work with the resources in the internal network but i'm desperate.

Edit 2: if you mean the Ip that the router gets from the provider its 195.138.XXX.XXX

ping 195.138.XXX.XXX -c 3
PING 195.138.XXX.XXX (195.138.XXX.XXX) 56(84) bytes of data.
64 bytes from 195.138.XXX.XXX: icmp_seq=1 ttl=254 time=0.542 ms
64 bytes from 195.138.XXX.XXX: icmp_seq=2 ttl=254 time=0.493 ms
64 bytes from 195.138.XXX.XXX: icmp_seq=3 ttl=254 time=0.491 ms

Crafty Kisses
July 7th, 2009, 08:41 AM
I remember reading a thread about this awhile back, and in fact I had the exact same issue, it turned to be a Gateway issue oddly enough. Which I ended up resolving myself. Anyway you can try running the following:

sudo ifconig eth0 192.168.4.254 netmask 255.255.255.0"
sudo ifconfig eth0 up
Remember replace your information accordingly. So you say it's not a DNS issue for sure? I just want to clarify this. What does this give you as well?

dhcpcd
I also wouldn't mind seeing some logs, once you post these, I or somebody else here on the forums can help assist you more in your networking issue. What are the results from this command?

tail -f /var/log/syslog
From the looks of it though your routing table looks fine. I've also heard if people have problems similar to this, they can forward port 53, and have some results. I actually read that on another forum. I don't remember. You can also try if you want, if you already have, which I think you might have, but I thought I'd mention it:

echo "nameserver [ip of router]" > /etc/resolv.conf
Try that and see if you can connect to the net.

cartmanx
July 7th, 2009, 09:16 AM
I have tried manually setting the ip. I also tried with different DNS settings including leaving only the routers ip as a dns server. Still nothing. Here is the output of


tail -f /var/log/syslog
Jul 7 11:08:40 ubu_rv /etc/mysql/debian-start[2185]: Triggering myisam-recover for all MyISAM tables
Jul 7 11:08:42 ubu_rv acpid: client connected from 2377[108:119]
Jul 7 11:08:43 ubu_rv /usr/sbin/cron[2448]: (CRON) INFO (pidfile fd = 3)
Jul 7 11:08:43 ubu_rv /usr/sbin/cron[2449]: (CRON) STARTUP (fork ok)
Jul 7 11:08:43 ubu_rv /usr/sbin/cron[2449]: (CRON) INFO (Running @reboot jobs)
Jul 7 11:08:47 ubu_rv kernel: [ 19.790022] eth0: no IPv6 routers present
Jul 7 11:08:53 ubu_rv console-kit-daemon[2266]: WARNING: Couldn't read /proc/2265/environ: Failed to open file '/proc/2265/environ': No such file or directory
Jul 7 11:09:01 ubu_rv /USR/SBIN/CRON[2529]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm)
Jul 7 11:09:34 ubu_rv ntpdate[2003]: can't find host ntp.ubuntu.com
Jul 7 11:09:34 ubu_rv ntpdate[2003]: no servers can be used, exiting
Jul 7 11:10:01 ubu_rv /USR/SBIN/CRON[2560]: (root) CMD ([ -x /usr/sbin/update-motd ] && /usr/sbin/update-motd 2>/dev/null)
Also dhcpcd is not installed on this machine...

sam1948
July 7th, 2009, 01:08 PM
I join the request

i have full access to the router but no internet
i checked /etc/resolv.conf and it was fine with ==> nameserver my_router_ip
i also dual boot this specific computer and i do have internet on windows

ubuntu desktop 9.04 i386 intel network card

jamest09
July 7th, 2009, 04:00 PM
I join the request

i have full access to the router but no internet
i checked /etc/resolv.conf and it was fine with ==> nameserver my_router_ip
i also dual boot this specific computer and i do have internet on windows

ubuntu desktop 9.04 i386 intel network card

Can you resolve domains to ip addresses?

Brandon Williams
July 7th, 2009, 07:26 PM
Run 'sudo tcpdump -vvv -i any icmp' when you run your test pings so that you can see a) what the outgoing ping packets look like and b) whether responses are showing up on your machine.

It could be that responses are showing up on your machine and being ignored, or it could be that no responses are coming back. If it's the former, then the packet drops should show up in some log file. If it's the later, then there will hopefully be something that we can identify about the outgoing packets that would explain why they are being dropped.

If you have another machine on the network that appears to have connectivity, it would be helpful to run tcpdump on that machine, too, so that you can compare the outgoing and incoming packets to look for differences that might help with diagnosis.

sam1948
July 10th, 2009, 12:18 AM
thanks for the replay sorry it took me so long

i switched to linux and run this in the terminal


:~$ dig www.google.com

; <<>> DiG 9.5.1-P2 <<>> www.google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6716
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
www.google.com. 1030 IN CNAME www.l.google.com.
www.l.google.com. 131 IN A 74.125.39.106
www.l.google.com. 131 IN A 74.125.39.147
www.l.google.com. 131 IN A 74.125.39.99
www.l.google.com. 131 IN A 74.125.39.103
www.l.google.com. 131 IN A 74.125.39.104
www.l.google.com. 131 IN A 74.125.39.105

;; Query time: 2 msec
;; SERVER: 190.170.1.1#53(190.170.1.1)
;; WHEN: Fri Jul 10 02:02:21 2009
;; MSG SIZE rcvd: 148

oz@room:~$
oz@room:~$ wget www.google.com/index.html
--2009-07-10 02:04:25-- http://www.google.com/index.html
Resolving www.google.com... 74.125.39.106, 74.125.39.147, 74.125.39.99, ...
Connecting to www.google.com|74.125.39.106|:80... failed: No route to host.
Connecting to www.google.com|74.125.39.147|:80... failed: No route to host.
Connecting to www.google.com|74.125.39.99|:80... failed: No route to host.
Connecting to www.google.com|74.125.39.103|:80... failed: No route to host.
Connecting to www.google.com|74.125.39.104|:80... failed: No route to host.
Connecting to www.google.com|74.125.39.105|:80... failed: No route to host.
oz@room:~$


5 minutes later i ran this in windows


C:\Users\oz>nslookup www.google.com
Server: UnKnown
Address: 190.170.1.1

Non-authoritative answer:
Name: www.l.google.com
Addresses: 74.125.39.106
74.125.39.147
74.125.39.99
74.125.39.103
74.125.39.104
74.125.39.105
Aliases: www.google.com


so my ubuntu resolves dns correctly but no connection is avaliable

weird

jonobr
July 10th, 2009, 12:22 AM
Recommend you try the tcpdump as recommended by Brandon Williams

If you ping the ip address of the google servers, or do a trace route and supply results they would help

Cheers


PS-- The least you could have done was called..but no, no phone call, no letter... I feel so used......



:-)

sam1948
July 10th, 2009, 07:10 AM
first: thank u all it was solved

i tried the trace route recommendation but i dont have that command installed.
i only have traceroute6.
so i tried it


room:~$ traceroute6 74.125.43.103
traceroute: unknown host 74.125.43.103
oz@room:~$ traceroute6 www.google.com
traceroute: unknown host www.google.com


because the recommendation of trace route was binded with pinging to an external address, i also did

room:~$ ping 74.125.43.103
PING 74.125.43.103 (74.125.43.103) 56(84) bytes of data.
64 bytes from 74.125.43.103: icmp_seq=1 ttl=50 time=98.0 ms
64 bytes from 74.125.43.103: icmp_seq=2 ttl=50 time=98.8 ms
64 bytes from 74.125.43.103: icmp_seq=3 ttl=50 time=99.1 ms
64 bytes from 74.125.43.103: icmp_seq=4 ttl=50 time=97.6 ms
64 bytes from 74.125.43.103: icmp_seq=5 ttl=50 time=98.

and suddenly my pidgin reported online friends !!!

i thought some cached "ip to mac address" table in the home router was updated as a result of pinging' but the fact that i was connected from widows contradicts this assumption.

for me it is still not so clear
but at least i can write this from ubuntu again(:

jonobr
July 10th, 2009, 05:53 PM
Rock and roll baby

:guitar: