LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-09-2005, 03:22 PM   #1
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
Problem with Apt-get - all address have ip 1.0.0.0


Hi,
I installed sarge with the 2.6 kernel, and after i got logged in, i started to get the programs i want (need). So i type apt-get install mozilla-firefox.
It downloads this, and it works fine. Great, now whatever I try to download (or even update) screws up - here is what i get on my screen:

Quote:
/home/tom# apt-get update
0% [Connecting to www.uk.debian.org (1.0.0.0)] [Connecting to security.debian.org (1.0.0.0)]
It seems to be resolving all address to the IP 1.0.0.0 which seems a little strange (xchat used to do this to me on mandrake when i typed in an incorrect server address so i when i see this address i tend to see it as an error). Here is a copy of my /etc/apt/sources.list file.

Quote:
#deb file:///cdrom/ sarge main

deb http://www.uk.debian.org/debian/ stable main
deb-src http://www.uk.debian.org/debian/ stable main


deb http://security.debian.org/ stable/updates main

# KDE
deb http://pkg-kde.alioth.debian.org/kde-3.4.0/ ./

#java
deb ftp://ftp.tux.org/java/debian/ unstable non-free
deb ftp://sunsite.dk/mirrors/java-linux/debian/ testing non-free
Has anyone else come across this problem in the past and/or know how to fix it? Thanks in advance.
 
Old 06-09-2005, 04:52 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well this shouldn't have anything to do with apt per se.... never quite know though. what happens if you call "dig www.uk.debian.org" ? should give you the real ip address, i.e. 83.142.228.128. if you're desperate for a quick fix, you could always quickly hardcode the ip's in there (or maybe better... add your own entries to /etc/hosts) and check for an update to apt and other generic networking libraries. still don't think it should be possible to be an apt problem though.
 
Old 06-10-2005, 04:40 AM   #3
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
Ok, I did what you said. My sources.list looks like this now:

Quote:
#deb file:///cdrom/ sarge main

#deb http://www.uk.debian.org/debian/ stable main
deb http://83.142.228.128/debian/ stable main
#deb-src http://www.uk.debian.org/debian/ stable main
deb-src http://83.142.228.123/debian/ stable main

#deb http://security.debian.org/ stable/updates main
deb http://194.109.137.218 stable/updates main
I've commented most of it out so if I find a solution I can revert back.

This is the output from the terminal when i run apt-get update

Quote:
apt-get update
Err http://83.142.228.128 stable/main Packages
404 Not Found
Ign http://83.142.228.128 stable/main Release
Err http://194.109.137.218 stable/updates/main Packages
404 Not Found
Ign http://194.109.137.218 stable/updates/main Release
16% [Connecting to 83.142.228.123 (83.142.228.123)]
Please note it hangs on 16%, and I have to terminate with ctrl+c.

Would it make a difference to the results if I wasn't behind a router (with NAT and firewall enabled)?

Last edited by tomj88; 06-10-2005 at 04:41 AM.
 
Old 06-10-2005, 06:23 AM   #4
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Hi. I upgraded my Debian 3.0r2 (Woody) to the testing (Sarge) version over the Internet (on dial-up which took ages). I'm using the following testing repository for all updates, and this is working fine.
deb http://http.us.debian.org/debian testing main contrib non-free

I did have the same URL but for the stable version running as well with no problems, but was getting no updates from that, presumably because everthing is upgraded to the testing version.
I also had a non-us repo in the sources. list, and these were working ok, but last time I ran apt-get I was getting a 404 on this one, so commented it out in the list.

It may be worth trying the testing repo thats working ok for me. Nigel aka farpoint.

Kernel: 2.6.8-2-386
KDE: 3.3
 
Old 06-11-2005, 10:03 AM   #5
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
I tried that, and I'm still having no luck
That lines gives the same output as before:

0% [Connecting to http.us.debian.org (1.0.0.0)] [Connecting to security.debian.org (1.0.0.0)]
 
Old 06-12-2005, 01:54 PM   #6
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
I tried disabling NAT and Firewall (at different times and then the same time) on my router. This caused me to suffer from a lack of internet access, so I don't think that this could be the culprit. I'm still getting this problem (even after a complete re-install to put Debian on my main hard disk drive), so is there something I am doing drastically wrong?
 
Old 06-12-2005, 02:00 PM   #7
MikeZila
Member
 
Registered: Jul 2004
Location: Parts Unknown
Distribution: Arch
Posts: 377

Rep: Reputation: 30
So, you have working internet access on this box? Can you get to debian.org via FireFox, Lynx, or some other browser?
 
Old 06-12-2005, 03:22 PM   #8
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
The stupid thing about this "predicament" is that I can access the internet flawlessly with any other application: I can ping debian.org
Quote:
tom@tomj:~$ ping debian.org
PING debian.org (192.25.206.10) 56(84) bytes of data.
64 bytes from debian.org (192.25.206.10): icmp_seq=1 ttl=48 time=324 ms
64 bytes from debian.org (192.25.206.10): icmp_seq=2 ttl=48 time=330 ms
64 bytes from debian.org (192.25.206.10): icmp_seq=3 ttl=48 time=308 ms
64 bytes from debian.org (192.25.206.10): icmp_seq=4 ttl=48 time=329 ms

--- debian.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 308.162/323.189/330.512/8.942 ms
I am currently writing this article using konqueror on the same machine I am having problems with apt-get on. It just doesn't make any sense (to me anyway). Please ask if you need any other information.
 
Old 06-13-2005, 12:47 AM   #9
hiebert
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Tom,

Near as I can tell you're having a DNS problem and not specifically a problem with apt. I'm having the same problem as well. I'll describe what I've seen and maybe it will match up.

On my home network I have a P.o.S. Actiontec router (w/ wireless) / DSL modem that is the gateway for several servers and whatever machines I have on the wireless. The configuration for the DHCP server seems to not work very well, as I give it in the configuration both IP addresses to use for DNS servers (the IP addresses to pass along to DHCP clients), but instead it passes along itself (192.168.0.1) and the first IP that I give it (i.e. it decides automatically without giving me a choice that it's going to do caching).

So after running dhclient the /etc/resolv.conf looks like this:
search domain.actdsltmp
nameserver 192.168.0.1
nameserver 207.<protected_ip_addr>
with <protected> replaced with the real IP of the DNS server.

This would be fine if Actiontec's internal DNS server worked, but like you're experiencing, it often returns 1.0.0.0.
Now, the part that I don't get is _why_ does it only return 1.0.0.0 for lookups on HTTP requests (your apt sources are all http)? *boogle*

Anyway, the hackish way that I fixed it is just by overriding the DNS on my client so that the DNS queries always bypass the Actiontech cache.

So my /etc/sysconfig/network-scripts/ifcfg-eth0 has a couple entries like this:
PEERDNS=yes
DNS1=207.<real_ip_1>
DNS2=207.<real_ip_2>

It may be a little different in debian. Specifically you can set up dhclient to override the results it gets from the DHCP server, so see the dhclient.conf(5) man page for details.
Anyway, it's _sounds_ like what you're experiencing, but let me know if I'm in left field and I can come up with another theory

~JMH
 
Old 06-13-2005, 06:19 AM   #10
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
First of all, my /etc/resolv.conf file seems to be similar to yours:
search
nameserver 192.168.1.1
I could add the domain for my router but, correct me if I'm wrong, it would be pretty pointless (it's not too hard typing in 192.168.1.1 everytime i need to change something).
Secondly, I don't have a /etc/sysconfig/network-scripts/ifcfg-eth0 file on my computer. I have tried locate ifcfg-eth0, and nothing is returned, and the sysconfig and network-scripts directories don't exist either. Could I put your hack method into /etc/resolv.conf, or this a stupid idea?
Also,
PEERDNS=yes
DNS1=207.<real_ip_1>
DNS2=207.<real_ip_2>
Does real_ip_1 and _2 mean the real ip of the site's I'm tyring to access i.e. security.debian.org or the ip of my router?
 
Old 06-13-2005, 11:06 AM   #11
hiebert
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Yeah, /etc/sysconfig is a fedora thing, so ignore that part.

So to recap, the root of our problem is that the DNS server in our consumer routers doesn't work correctly (or is unconfigurable or something, I haven't really figured that part out). So we're want to bypass it. Instead of having

nameserver 192.168.1.1

in your resolv.conf file, you want to have the IP addresses of two nameservers that should have been given to you by your provider. Let's assume that they are 206.6.5.100 and 206.6.5.101 (sorry to anyone to whom they may belong).

So eventually you want your /etc/resolv.conf file to look like
search
nameserver 206.6.5.100
nameserver 206.6.5.101

You could just type that in, but dhclient (when you use DHCP to determine your IP addr, etc.) overwrites /etc/resolv.conf with whatever info it gets from the DHCP server (which is likely your consumer router). So, now we have two options. 1) Configure your router's DHCP server to always send the addresses of those two DNS servers. How to do that depends on your router so I can't help you here, but even when I _did_ configure my router's DHCP server to send my provider's two DNS server, it still didn't do it (thank you Actiontec!).

So 2) your other option is to have dhclient override whatever the DHCP server tells it. In my other post I wrote how I did that, but you can probably do it a little different in debian.

Add these lines to the beginning of your /etc/dhclient.conf file:

interface "eth0" {
prepend domain-name-servers 207.6.5.100,207.6.5.101;
}

Replaice eth0 with the name of your network interface and 207.6.5.* with the IP addresses of your provider's DNS servers.
Hope that this helps.

~JMH
 
Old 06-13-2005, 11:52 AM   #12
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
Thanks alot, I will try this soon, but I have got to find my ISP's dns address first, will have a search. I'm having to move my computer out of my room for a few hours tomorrow, so I am going plug it in near a phone socket and use my ADSL router, to see if it is to do with my router, which seems to be highly likely. What I can't understand is why this DNS problem is only affecting apt-get (as far as I know).
 
Old 06-14-2005, 06:37 AM   #13
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Original Poster
Rep: Reputation: 30
Ok, I tried to get my usb modem to work (had plugged into router and kept switching untill i got the modem to work) I found out the I needed to install some packages to get this modem to work - and because apt-get isn't working with my router... So I think, why the hell not? apt-get update and it works?!? Moving my computer downstairs has obviously made a difference then... Lets hope that it works later when it goes back upstairs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
apt sources.list by IP address? redsky Debian 4 06-24-2004 12:46 PM
can access site address but not hostip: dag apt tomhemba Linux - Networking 2 06-17-2004 09:01 PM
rh9 xd2 apt apt-get problem fix and solution transeunt Red Hat 0 12-16-2003 10:54 PM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration