Problem with Apt-get - all address have ip 1.0.0.0
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
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.
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
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?
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:
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).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.