Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Using the IP in source.list - I have no name resolution

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
YuriAoto
Posts: 3
Joined: 2021-03-12 11:32

Using the IP in source.list - I have no name resolution

#1 Post by YuriAoto »

Dear all,

I am having trouble with name resolution in a server with debian and I cannot even install packages, such as dig or nslookup, to investigate the issue. I tried to use the IP addres in the source.list, as described here:

https://wiki.debian.org/SourcesList#Name_Resolution

but it failed. I did use the IP from `host` (in another machine):

Code: Select all

(at a computer with name resolution)$ host deb.debian.org
deb.debian.org is an alias for debian.map.fastlydns.net.
debian.map.fastlydns.net has address 151.101.178.132
debian.map.fastlydns.net has IPv6 address 2a04:4e42:2a::644
And thus:

Code: Select all

$ cat /etc/apt/sources.list

deb http://151.101.178.132/debian contrib main 
But it does not update:;

Code: Select all

$ apt update
Err:1 http://151.101.178.132/debian contrib InRelease
  500  Domain Not Found [IP: 151.101.178.132 80]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://151.101.178.132/debian/dists/contrib/InRelease  500  Domain Not Found [IP: 151.101.178.132 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Any hints??

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Using the IP in source.list - I have no name resolution

#2 Post by p.H »

Using the IP address in URL does not work when the server uses virtual hosts.
If you have no DNS resolution, you can define hostnames in /etc/hosts.

YuriAoto
Posts: 3
Joined: 2021-03-12 11:32

Re: Using the IP in source.list - I have no name resolution

#3 Post by YuriAoto »

Right, I see.

I actually solved the dns problem, it was on the firewall of my gateway, that was not properly configured (iptables and firewalld are very confusing to me).

But thank you anyway!

Yuri

Post Reply