LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   my dlink router isn't working in linux (http://www.linuxquestions.org/questions/linux-networking-3/my-dlink-router-isnt-working-in-linux-476566/)

ma1069 08-23-2006 09:20 AM

my dlink router isn't working in linux
 
Hello,

I am trying to connect my ubuntu distro to a dlink router by using a lan cable.
All seems to work quite well, I can ping any website and any pc on my network,
but firefox can't load the web pages!!!

I've tried to use fixed IPs instead DHCP but it doesn't work anyway. The strange thing
is that my laptop (winXp) works with the same configuration and it can connect to internet.

IP of the router: 192.168.1.1

IP of the pc: 192.168.1.2 Mask: 255.255.255.0
Gateway: 192.168.1.1 Broadcast: 192.168.1.255
DNS: 192.168.1.1

I've tried to reboot the network connection using 'ifdown eth0' and 'ifup eth0' but it hasn't worked anyway...

Any help will be appreciated, thanks!

slackhack 08-23-2006 09:33 AM

there's probably a firewall function (might not be called that, though) on the router that's blocking the web by default. it might be called a "service" or virtual server or something like that. what's the model number?

>oops, didn't see that windows can connect (ADD attack ;)). maybe it's an iptables entry on your PC, though that would seem a little weird. unless ubuntu blocks the web by default to "protect" you, like it forces the sudo thing on you.

ma1069 08-23-2006 09:39 AM

the model name is DSL-G624T, I feared that the firewall could interfere so I've disabled it using the web pages of the router (the only pages I can see into firefox), but hasn't worked.
[edit: i've also found the virtual server option, in this page I can set some rules for each IP address, but there aren't any of them applied. Now I'm trying to add some rule]

ma1069 08-23-2006 10:07 AM

Thank you,

I've checked iptables using the command 'iptables -L' but this is the result:

------------------------------------------------------------------
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FOWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
------------------------------------------------------------------

I don't see anything blocked (but neither anything allowed...) is this correct?
I've never configured it, I have to admit that I'm a noob on firewalling things...

slackhack 08-23-2006 10:22 AM

it says there are no rules, so you are clear as far as that goes. have you tried other browsers? can you get to the web if you use an IP address instead of a name (http://64.233.187.99/ instead of http://www.google.com for example)? try rebooting the network connection with the networking script (i think for debian at least) found in /etc/init.d (# /etc/init.d/networking restart). seems like it could have something to do with dhcp.

ma1069 08-23-2006 10:36 AM

Unfortunately I don't have any other browser, I've installed this distro from a single CD with few things (I will download more stuff once it will work -.-) I've tried 'apt-get update' but it doesn't connect too.

However, if I put the IP address everything works well!!
I'll start surfing pinging the websites to get the IP then putting the IP on firefox, but I bet that it exists a better way ;)

[Edit: I've tried 'networking restart', it worked but it hasn't chanded anything]

slackhack 08-23-2006 10:41 AM

post what's in your /etc/resolv.conf file, or put these two lines at the top and try the web again:

nameserver 208.67.222.222
nameserver 208.67.220.220

ma1069 08-23-2006 10:52 AM

Wow
 
Works perfectly!! Thank you!!!!!

In that file I had written the address of the router, maybe was that setting wrong...

Thank you again!!

slackhack 08-23-2006 10:59 AM

great! just be aware that might get reset when you reboot. you'll have to find out where dhcp is being called from or where the settings are to tell it not to overwrite your resolv.conf every time. not sure where that is in ubuntu, but it shouldn't be too hard to find out with a search of LQ or the ubuntu forum. gl :cool:

ma1069 08-23-2006 02:34 PM

no problem :) It may sound like "cheating", but the graphical network tool in ubuntu has exactly this setting ;P

again, thanks!


All times are GMT -5. The time now is 08:18 AM.