Computing.Net > Forums > Linux > My Debian can't connect Internet

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

My Debian can't connect Internet

Reply to Message Icon

Name: satimis
Date: December 12, 2003 at 09:12:13 Pacific
OS: Debian 3.0
CPU/Ram: PIII/256MB
Comment:

Hi folks,

My Debian box can't connect Internet, Broadband connected.

# ifconfig
showed connecting ISP

I played around with following files without a solution;

# cat /etc/network/ifstate
lo=lo
eth0=eth0

# cat /etc/network/interfaces
# /etc/network/interfaces -- configuration
file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian
installationauto eth0
iface eth0 inet dhcp

# cat /etc/network/spoof-protect
LOCAL_IPS="127.0.0.1/8"
LOCAL_IFACES="eth0 eth1 ppp0"
(Remark: having tried;
#LOCAL_IPS="127.0.0.1/8"
#LOCAL_IFACES="eth0 eth1 ppp0"
LOCAL_IFACES="eth0 ppp0"

After each change made
# /etc/init.d/networking restart
Reconfiguring network interfaces: done)

# cat /etc/network/interfaces.dpkg-new
# (no output, an empty file)

# cat /etc/network/options
ip_forward=no
spoofprotect=yes
syncookies=no
(having tried;
ip_forward=yes
spoofprotect=no
syncookies=yes)

# ping -c 3 www.yahoo.com
ping: unknown host www.yahoo.com

# /etc/init.d/iptables stop
Aborting iptables load: unknown ruleset, "inactive".

iptables has not been configured yet

Kindly advise how to fix the problem.

Thanks in advance.

B.R.
satimis



Sponsored Link
Ads by Google

Response Number 1
Name: Audiophile
Date: December 12, 2003 at 09:31:36 Pacific
Reply:

can you oing IP addresses? If yes then add your ISP's DNS servers to /etc/resolv.conf as:

namerserver <dns-ip-here>


0

Response Number 2
Name: Jonathan
Date: December 12, 2003 at 12:34:16 Pacific
Reply:

Change the line in /etc/interfaces that reads "auto lo" to "auto lo eth0" and see how that works. Without specifying eth0 in the auto line, you will have to manually start your network everytime you reboot.

Jonathan


0

Response Number 3
Name: Jonathan
Date: December 12, 2003 at 12:40:02 Pacific
Reply:

oops - that should be /etc/network/interfaces

upon closer inspection, it looks like there may be a line that reads "auto eth0" already?

If there is, you will need to check your log files most likely /var/log/syslog to determine why precisely your network is not working. You may not have the proper drivers installed, or there may be a few parameters you need to pass to ifconfig to get things working properly.

Jonathan


0

Response Number 4
Name: satimis
Date: December 14, 2003 at 07:57:20 Pacific
Reply:

Hi Audiophile,

no.

# ping -c 3 66.218.71.86
PING 66.218.71.86 (66.218.71.86): 56 data bytes
--- 66.218.71.86 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:202.123.68.108 P-t-P:202.123.71.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:152 errors:0 dropped:0 overruns:0 frame:0
TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:10109 (9.8 KiB) TX bytes:1932 (1.8 KiB)


Following discoveries were found

1) # pppoe
pppoe: Timeout waiting for PADO packets
(pppoe could not start. It can be started at of configuring network card)

2) /etc/resolv.conf could not be edited even as ROOT (the file can be opened and its content can be edited. But saving is impossible)

# cat /etc/resolv.conf
search domain.com\000
nameserver 192.168.2.1

# ls -l /etc/resolv.conf
-rw-r--r-- 1 root root

B.R.
satimis


0

Response Number 5
Name: satimis
Date: December 14, 2003 at 08:00:10 Pacific
Reply:

Hi Jonathan,

Changing the line in /etc/interfaces that reads "auto lo" to "auto lo eth0" has no improvement.

B.R.
satimis


0

Related Posts

See More



Response Number 6
Name: satimis
Date: December 14, 2003 at 08:04:04 Pacific
Reply:

Hi Jonathan,

Again.

I found following statments in /var/log/syslog
Are there any influence?


sl0: unknown hardware address type 256
Dec 15 02:14:42 debian dhclient-2.2.x: ppp0: unknown hardware address type 512
Dec 15 02:14:43 debian dhclient-2.2.x: sl0: unknown hardware address type 256
Dec 15 02:14:43 debian dhclient-2.2.x: ppp0: unknown hardware address type 512
Dec 15 02:14:43 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 255.255.255.255 port 67

Dec 15 02:38:01 debian /USR/SBIN/CRON[2143]: (mail) CMD ( if [ -x /usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)
Dec 15 02:38:04 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67

Dec 15 02:48:04 debian pppoe[229]: recv (receivePacket): Network is down
Dec 15 02:48:04 debian pppoe[229]: recv (receivePacket): Network is down
Dec 15 02:48:04 debian dhclient-2.2.x: sl0: unknown hardware address type 256
Dec 15 02:48:04 debian dhclient-2.2.x: ppp0: unknown hardware address type 512
Dec 15 02:48:05 debian dhclient-2.2.x: sl0: unknown hardware address type 256
Dec 15 02:48:05 debian dhclient-2.2.x: ppp0: unknown hardware address type 512

Dec 15 03:17:44 debian diald[242]: Delaying 1 seconds before clear to dial.
Dec 15 03:17:44 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:17:44 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:17:44 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.

Dec 15 03:28:49 debian diald[242]: SIGTERM. Termination request received.
Dec 15 03:28:49 debian diald[242]: Diald is dying with code 0
Dec 15 03:28:49 debian modprobe: modprobe: Can't locate module char-major-45
Dec 15 03:28:49 debian modprobe: modprobe: Can't locate module char-major-45
Dec 15 03:28:49 debian modprobe: modprobe: Can't locate module ippp0
Dec 15 03:28:49 debian modprobe: modprobe: Can't locate module char-major-45
Dec 15 03:28:49 debian modprobe: modprobe: Can't locate module char-major-45
Dec 15 03:28:50 debian wwwoffled[327]: Exit signalled.
Dec 15 03:28:50 debian wwwoffled[327]: Exiting.


Dec 15 03:30:24 debian pppd[223]: not replacing existing default route to eth0 [192.168.2.1]
Dec 15 03:30:24 debian pppd[223]: Cannot determine ethernet address for proxy ARP
Dec 15 03:30:24 debian pppd[223]: local IP address 202.123.68.247
Dec 15 03:30:24 debian pppd[223]: remote IP address 202.123.71.254
Dec 15 03:30:24 debian pppd[223]: primary DNS address 202.123.77.197
Dec 15 03:30:24 debian pppd[223]: secondary DNS address 202.123.77.213

Dec 15 03:30:50 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:30:50 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:30:50 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.
Dec 15 03:31:05 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:31:05 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:31:05 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.
Dec 15 03:31:20 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:31:20 debian dhclient-2.2.x: DHCPACK from 192.168.2.1

B.R.
satimis



0

Response Number 7
Name: Jonathan
Date: December 14, 2003 at 19:58:06 Pacific
Reply:

I guess we need to start at the beginning, because it appears that your network card drivers are not properly installed. Did your network ever work? i.e., during installation? Debain sometimes properly configures the network during installation, and then forgets how to use the network after you are done installing. You need to make sure the proper kernel modules are loaded for your network card. (btw, which kernel are you using?)

If you are using a 2.4 kernel, try running "mofconf" as root and see if you can load the network card driver.

Jonathan


0

Response Number 8
Name: Jonathan
Date: December 14, 2003 at 20:00:57 Pacific
Reply:

What happens when you run "ifconfig" without sepcifying an interface - does it list a block for eth0? or is it just things like lo, ppp0 and such?

Jonathan


0

Response Number 9
Name: satimis
Date: December 14, 2003 at 21:23:42 Pacific
Reply:

Hi Jonathan,

Thanks for your advice.

There is no problem on NIC. I have a mobile hard drive on this box running RH9. It works perfectly.

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BF:70:F6:DD
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:804 errors:0 dropped:0 overruns:0 frame:0
TX packets:535 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:114717 (112.0 KiB) TX bytes:96191 (93.9 KiB)
Interrupt:5 Base address:0xec00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:36068 errors:0 dropped:0 overruns:0 frame:0
TX packets:36068 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12467899 (11.8 MiB) TX bytes:12467899 (11.8 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:202.123.68.108 P-t-P:202.123.71.254
Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:347 errors:0 dropped:0 overruns:0 frame:0
TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:24167 (23.6 KiB) TX bytes:3972 (3.8 KiB)

sl0 Link encap:Serial Line IP
inet addr:192.168.0.1 P-t-P:192.168.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

Kernel = 2.2

If I could not find a solution I am prepared to make another clean installation of Debian 3.0 This time I will use net-installation. My box is connecting to 3MB broadband. It won't take long time to download. Unless the installation will start from compiling source code, like Gentoo 1.4. then it will take prolonged time to install from Debian website

B.R.
satimis



0

Response Number 10
Name: Jonathan
Date: December 16, 2003 at 09:06:16 Pacific
Reply:

Sorry it took me so long to get back to you. It looks to me like your ethernet connection is working from your ifconfig output. It has been assigned an ip address (probably via dhcp). It looks like your problem is in the routing or firewall setup. What happens when you run "iptables -L"?

Jonathan


0

Response Number 11
Name: satimis
Date: December 17, 2003 at 07:35:03 Pacific
Reply:

Hi Jonathan,

I have not setup firewall yet.

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

This Debian box is connected to broadband via ADSL modem, with dynamic IP. The PC is for testing purpose with 2 NICs and has 2 mobile drives, running XP and RH8.0 respectinve. Connection to Internet has no problem.

Before installing Debian 3.0 I already removed one NIC-eth1. I can't understandy it is always searching for eth1

B.R.
satimie


0

Response Number 12
Name: Jonathan
Date: December 17, 2003 at 09:43:00 Pacific
Reply:

This is getting weird.... from your log, I see that eth0- really is being properly initialized (I went over it line by line and extracted the relevant bits):

Dec 15 03:17:44 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:17:44 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:17:44 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.

and then later:

Dec 15 03:30:24 debian pppd[223]: not replacing existing default route to eth0 [192.168.2.1]
Dec 15 03:30:24 debian pppd[223]: Cannot determine ethernet address for proxy ARP
Dec 15 03:30:24 debian pppd[223]: local IP address 202.123.68.247
Dec 15 03:30:24 debian pppd[223]: remote IP address 202.123.71.254
Dec 15 03:30:24 debian pppd[223]: primary DNS address 202.123.77.197
Dec 15 03:30:24 debian pppd[223]: secondary DNS address 202.123.77.213

Dec 15 03:30:50 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:30:50 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:30:50 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.
Dec 15 03:31:05 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:31:05 debian dhclient-2.2.x: DHCPACK from 192.168.2.1
Dec 15 03:31:05 debian dhclient-2.2.x: bound to 192.168.2.3 -- renewal in 15 seconds.
Dec 15 03:31:20 debian dhclient-2.2.x: DHCPREQUEST on eth0 to 192.168.2.1 port 67
Dec 15 03:31:20 debian dhclient-2.2.x: DHCPACK from 192.168.2.1


I see a couple of disturbing things in this setup..... first, your dchp renewal time is 15 seconds - this is bad. Renewal should be much longer - I think I have mine set for one week. The problem with a short time period like 15 seconds is that the DCHP client will try to obtain a new ip address every 15 seconds - meaning it will be continually requesting new ip addresses - rendering your network connection almost unusable. Also, it appears as though your computer is trying to establish a ppp connection - this must be your DSL commection. Is eth0 connected to your DSL modem, or your internal network?

Jonathan


0

Response Number 13
Name: satimis
Date: December 17, 2003 at 18:12:52 Pacific
Reply:

Hi Jonathan,

>>>>>
I see a couple of disturbing things in this setup..... first, your dchp renewal time is 15 seconds - this is bad. Renewal should be much longer - I think I have mine set for one week. The problem with a short time period like 15 seconds is that the DCHP client will try to obtain a new ip address every 15 seconds - meaning it will be continually requesting new ip addresses - rendering your network connection almost unusable. Also, it appears as though your computer is trying to establish a ppp connection - this must be your DSL commection. Is eth0 connected to your DSL modem, or your internal network?
<<<<<

1) eth0 is connected to ADSL-modem, from there to broadband.

2) I can't control the renewal time which is operated by ISP. But other Linux distro work without problem

2) This Debian box has been connected to Internet once (ONLY ONCE) after adding "usepeerdns" to /etc/ppp/peer/provider. I reconfirmed this addition having effect by deleting it. Then re-added "usepeerdns" to /etc/ppp/peer/provider but it never worked again, cut-off from Internet, ISP connected.

B.R.
satimis


0

Response Number 14
Name: Jonathan
Date: December 18, 2003 at 08:10:18 Pacific
Reply:

That is odd then. eth0 is being assigned an ip address for your local subnet.... i.e., like 192.168.2.3, while pppd is finding the (presumably crrect) ip address from your isp (202.123.68.247), but not assigning it to eth0. Also, I believe you can tell dhclient how often to request renewal of the dynamic IP - that is what I was saying about the 15 second renewal time.

Jonathan


0

Response Number 15
Name: satimis
Date: December 18, 2003 at 08:31:20 Pacific
Reply:

Hi Jonathan,

I discover a solution;

# route del default gw 192.168.2.1
# route add default gw 202.123.71.254
(my ISP's IP)

# ping -c 3 www.yahoo.com
PING www.yahoo.akadns.net (216.109.118.73) 56(84) bytes of data.
64 bytes from p10.www.dcn.yahoo.com (216.109.118.73): icmp_seq=1 ttl=48
time=287 ms
64 bytes from p10.www.dcn.yahoo.com (216.109.118.73): icmp_seq=2 ttl=48
time=288 ms
64 bytes from p10.www.dcn.yahoo.com (216.109.118.73): icmp_seq=3 ttl=48
time=296 ms

--- www.yahoo.akadns.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2025ms
rtt min/avg/max/mdev = 287.260/290.723/296.223/3.981 ms

It works now. Internet seems connected.

But I have not figured out a solution
how to config the OS instead of running

# route del default gw 192.168.2.1
# route add default gw 202.123.71.254
each time.

Have you had any idea?

B.R.
satimis



0

Response Number 16
Name: Jonathan
Date: December 18, 2003 at 10:39:37 Pacific
Reply:

Put those commands in a shell script, and then put a copy of the script in /etc/network/if-up.d/ - that will execute those commands everytime your network is brought up (usually only on boot up, but can happen other times if you are upgrading network drivers, etc...)

Jonathan


0

Response Number 17
Name: satimis
Date: December 19, 2003 at 02:48:03 Pacific
Reply:

Hi Jonathan,

Created a file named 'startscript' as follows;

route del default gw 192.168.2.1
route add default gw 202.123.71.254

and save it /etc/network/if-up.d/startscript

# pon dsl-provider
# ping -c 3 www.yahoo.com
ping: unknown host

Can't connect Internet.

Rebooted the PC and ping again. No improvement found.

B.R.
satimis


0

Response Number 18
Name: jgeist
Date: December 19, 2003 at 16:45:11 Pacific
Reply:

Make sure it is executable - i.e., "chmod +x startscript".

Jonathan


0

Response Number 19
Name: satimis
Date: December 19, 2003 at 21:15:21 Pacific
Reply:

Hi Jonathan,

Yes, I did it twice

1)
# chmod +x /etc/network/if-up.d/startscript

2)
# cd /etc/network/if-up.d/
# chmod +x startscript

Still cut-off from Internet. I have to perform following commands manually after connecting ISP

# route del default gw xxx.xxx.xxx.xxx
# route add default gw xxx.xxx.xxx.xxx

then I can connect Internet

Seasons Greetings and B.R.
satimis



0

Response Number 20
Name: jgeist
Date: December 20, 2003 at 06:46:03 Pacific
Reply:

It must be that there is something else that is run on bootup *after* the network start scripts, that is required for your network to work. I'm not sure what it could be - I'm still kinda fuzzy myself on how those scripts are executed. You could try to add those lines to /etc/init.d/networking and see if that does the trick.

Jonathan


0

Response Number 21
Name: satimis
Date: December 21, 2003 at 08:40:26 Pacific
Reply:

Hi Jonathan,

As advised, add those 2 lines to
/etc/init.d/network.

Rebooted PC. This time it worked.

Lot of thanks for your advice and time
spent.

Merry X'Mas and B.R.
satimis

Furthermore I am still interested to find
out why it always looks at the gw 192.168.2.1 if
possible.


0

Response Number 22
Name: jgeist
Date: December 21, 2003 at 13:27:53 Pacific
Reply:

No idea why it looks to 192.168.2.1 - there is probably a line in some obscure config file somewhere for that :)

Anyway, I'm glad it works and you're welcome.

Jonathan


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: My Debian can't connect Internet

can't connect to the internet www.computing.net/answers/linux/cant-connect-to-the-internet/22865.html

Can't access internet with 2 LAN. www.computing.net/answers/linux/cant-access-internet-with-2-lan/25736.html

Can't connect to net! kppp messed. www.computing.net/answers/linux/cant-connect-to-net-kppp-messed/7487.html