PDA

View Full Version : [ubuntu] [SOLVED] help ubuntu server can't connect to internet



pshootr
December 12th, 2008, 03:55 AM
Hi, I have a linksys router hooked up to a cable modem for internet. I have two windows machines connected as well, to this router. Well I just installed ubuntu server 8.10. And hooked it to my router. Well dhcp from the router does not seem to work well with my server, so I configured my servers network config manually. I had no problems doing this part. But it seems that my dns was neglected during the configuation. Would I put my internet DNS in the form of a nameserver? Can someone please help me get my server online? Thanks

Iowan
December 12th, 2008, 04:16 AM
See4ms logical to add nameserver information to /etc/resolv.conf. I presume you have gateway set in /etc/network/interfaces.

pshootr
December 12th, 2008, 04:24 AM
See4ms logical to add nameserver information to /etc/resolv.conf. I presume you have gateway set in /etc/network/interfaces.

cat /etc/network/interfaces

adrress 192.168.15.102
netmask 255.255.255.0
network 192.168.15.0
broadcast 192.168.15.255
gateway 192.168.15.1
# dns-* options are implemented by the resolvconf package, if installed
dns-search pshootr.com

pshootr
December 12th, 2008, 05:15 AM
Since I am using my isp's DNS adresses, does this mean I do not need this part? "search example.com" And only enter

nameserver 0.0.0.0
nameserver 0.0.0.0 "Actual DNS adresses though obviously"

pshootr
December 12th, 2008, 06:26 AM
See4ms logical to add nameserver information to /etc/resolv.conf. I presume you have gateway set in /etc/network/interfaces.

How should my /etc/resolv.config look? taking in to account I do not have my own nameserver. And am puting DNS from my isp. thanks

pshootr
December 12th, 2008, 06:58 AM
No ideas at all? I have been working on this server all day and I still cant update the server. Please help

cariboo907
December 12th, 2008, 08:08 AM
Your resolve.conf file should look something like this:


cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 64.59.168.13
nameserver 64.59.168.15

You would of course substitute your ISP's dns address.

I would suggest trying:


sudo dhclient eth0

To see if that makes an internet connection.

Jim

pshootr
December 12th, 2008, 08:22 AM
Your resolve.conf file should look something like this:


cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 64.59.168.13
nameserver 64.59.168.15

You would of course substitute your ISP's dns address.

I would suggest trying:


sudo dhclient eth0

To see if that makes an internet connection.

Jim

Thanks Jim. I edited my resolv.config like you showed. So I guess that is not the problem. When I tried
sudo dhclient eth0 I got this.

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device

What gives?

anubhavrocks
December 12th, 2008, 08:38 AM
I guess your gateway must be having DNS relay,if that is the case stick this in /etc/resolv.conf

nameserver 192.168.15.1

Remember that if you run dhclient this might get overwritten.

Also try other simple diagnostics like ping'ing the gateway.That would eliminate the possiblity that your LAN has some issue(s).

anubhavrocks
December 12th, 2008, 08:47 AM
cat /etc/network/interfaces

adrress 192.168.15.102
netmask 255.255.255.0
network 192.168.15.0
broadcast 192.168.15.255
gateway 192.168.15.1
# dns-* options are implemented by the resolvconf package, if installed
dns-search pshootr.com

The above does not look correct,it doesnot have any interface entry.Assuming the network interface is eth0,the file should look like this.


iface eth0 inet static
adrress 192.168.15.102
netmask 255.255.255.0
network 192.168.15.0
broadcast 192.168.15.255
gateway 192.168.15.1

Do
ifconfig -a to find out the interface you need.

Finally you should do

sudo /etc/init.d/networking restart

pshootr
December 12th, 2008, 08:54 AM
I guess your gateway must be having DNS relay,if that is the case stick this in /etc/resolv.conf

nameserver 192.168.15.1

Remember that if you run dhclient this might get overwritten.

Also try other simple diagnostics like ping'ing the gateway.That would eliminate the possiblity that your LAN has some issue(s).

I have been able to ping the gateway. As matter of fact the gateway is 192.168.15.1 So I should try using the gateway adress in the resolv.config?

pshootr
December 12th, 2008, 09:01 AM
The above does not look correct,it doesnot have any interface entry.Assuming the network interface is eth0,the file should look like this.


iface eth0 inet static
adrress 192.168.15.102
netmask 255.255.255.0
network 192.168.15.0
broadcast 192.168.15.255
gateway 192.168.15.1

Do
ifconfig -a to find out the interface you need.

Finally you should do

sudo /etc/init.d/networking restart

Sorry I left out the interface before. It did show the interface as well.

anubhavrocks
December 12th, 2008, 09:04 AM
I have been able to ping the gateway. As matter of fact the gateway is 192.168.15.1 So I should try using the gateway adress in the resolv.config?

Yes.

pshootr
December 12th, 2008, 09:12 AM
Yes.

Unfortunatly using the gateway address in the resolv.config did not help me get any updates using apt-get update

This is bugging me to no end lol

anubhavrocks
December 12th, 2008, 09:15 AM
Can you ping IPs directly.

ping 209.85.171.100

pshootr
December 12th, 2008, 09:18 AM
Can you ping IPs directly.

ping 209.85.171.100

Wow! Yes I can ping that IP address...

anubhavrocks
December 12th, 2008, 09:20 AM
So lets try the OPEN dns servers:

echo "nameserver 208.67.222.222" > /etc/resolv.conf
echo "nameserver 208.67.220.220" >> /etc/resolv.conf

pshootr
December 12th, 2008, 09:26 AM
So lets try the OPEN dns servers:

echo "nameserver 208.67.222.222" > /etc/resolv.conf
echo "nameserver 208.67.220.220" >> /etc/resolv.conf

Nothing happens at all no error nothing.

anubhavrocks
December 12th, 2008, 09:29 AM
Actually you have to be superuser to give those commands.Just do a

cat /etc/resolv.conf

to make sure that the changes have taken place.

pshootr
December 12th, 2008, 09:32 AM
Actually you have to be superuser to give those commands.Just do a

cat /etc/resolv.conf

to make sure that the changes have taken place.

Yes the two ip's show up when I run "cat /etc/resolv.conf

nameserver 208.67.222.222
nameserver 208.67.220.220

pshootr
December 12th, 2008, 09:35 AM
OMG it is updating now with those nameservers.:shock::shock::shock:

anubhavrocks
December 12th, 2008, 09:36 AM
Okay now try this:

tracepath google.com

anubhavrocks
December 12th, 2008, 09:38 AM
omg it is updating now with those nameservers.:shock::shock::shock:

phew :)

pshootr
December 12th, 2008, 09:41 AM
Okay now try this:

tracepath google.com

Ok, First 10 lines said no reply, but then other lines started showing some host names it looked like. Then is stopped saying this.

Too many hops: pmtu 1500
Resume: pmtu 1500

pshootr
December 12th, 2008, 09:43 AM
How come those other nameservers work and mine do not lol?

anubhavrocks
December 12th, 2008, 09:57 AM
I guess you need to enable DNS Relay on your ADSL modem.

pshootr
December 12th, 2008, 10:03 AM
I guess you need to enable DNS Relay on your ADSL modem.

On my modem or router?

pshootr
December 12th, 2008, 10:09 AM
I wonder if I can get my dns servers or gateway address to work for me if I use the echo command?

anubhavrocks
December 12th, 2008, 10:20 AM
On my modem or router?

Does your ADLS modem have a browser based config?

pshootr
December 12th, 2008, 10:23 AM
Does your ADLS modem have a browser based config?

Well, not that I know of. Ofcourse my router does.

anubhavrocks
December 12th, 2008, 10:24 AM
So you do the PPPoE using the router?

pshootr
December 12th, 2008, 10:26 AM
Actually I did the echo command using my gateway address, and all seems well now. Thank you very very much. I banged my head all day long trying to fix this lol..:popcorn:

anubhavrocks
December 12th, 2008, 10:28 AM
You are welcome.Pl. mark the thread solved.

pshootr
December 12th, 2008, 10:37 AM
You totally made my night after a long day of struggling. You rock!