Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[resolved] Every hostname points to 10.0.0.2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
3Nd_R1m
n00b
n00b


Joined: 28 Jul 2021
Posts: 27
Location: Quebec, Canada

PostPosted: Fri Jul 15, 2022 6:54 am    Post subject: [resolved] Every hostname points to 10.0.0.2 Reply with quote

I'll let ping explains:
Code:

$ ping gnu.org
PING gnu.org.mydomain.net (10.0.0.2) 56(84) bytes of data.
...

And curl...
Code:

$ curl -v ifconfig.me
*   Trying 10.0.0.2:80...
...

and nmap...
Code:

$ nmap google.com
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-15 02:28 EDT
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for google.com (10.0.0.2)
...


So, every domain point back to my machine's local IP (10.0.0.2), and curl even replaced "gnu.org" with "gnu.org.mydomain.net". Even by regular network bug standards, this one is a headache :x .

This bug was introduced after I rebooted the machine a few hours ago. I don't have any issue comunicating with that machine using SSH or HTTPS from within the netwrok, so I believe the issue is internal only.


Last edited by 3Nd_R1m on Fri May 26, 2023 1:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 977
Location: Somewhere in Denmark

PostPosted: Fri Jul 15, 2022 7:04 am    Post subject: Reply with quote

What are the contents of /etc/resolv.conf and /etc/hosts like?
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 977
Location: Somewhere in Denmark

PostPosted: Fri Jul 15, 2022 7:05 am    Post subject: Re: Every hostname points to 10.0.0.2 Reply with quote

3Nd_R1m wrote:
I'll let ping explains:
Code:

$ nmap google.com
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-15 02:28 EDT
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for google.com (10.0.0.2)
...



Seems like it's complaining about no DNS-server?
Back to top
View user's profile Send private message
3Nd_R1m
n00b
n00b


Joined: 28 Jul 2021
Posts: 27
Location: Quebec, Canada

PostPosted: Fri Jul 15, 2022 3:16 pm    Post subject: Reply with quote

/etc/resolv.conf:
Code:

# Generated by resolvconf
domain mydomain.net


/etc/hosts:
Code:

127.0.0.1       mydomain.net localhost
::1             localhost


> Seems like it's complaining about no DNS-server?
The machine is hosting it's own Adguard Home DNS server, which forwards unresolved query to cloudflare.
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 926
Location: Richmond Hill, Canada

PostPosted: Fri Jul 15, 2022 3:49 pm    Post subject: Reply with quote

What is your 'libc'? is it glibc? or musl? or something else?

what is /etc/nsswitch.conf content?

with /etc/resolv.conf missing nameserver configuration option, all DNS resolution will try to connect to localhost port 53, So did you review your Adguard Home DNS server query log to see if there are something mis-configured?
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 977
Location: Somewhere in Denmark

PostPosted: Fri Jul 15, 2022 3:54 pm    Post subject: Reply with quote

I'd check Adguard - looks/sounds like it's blackholing everything?
Could try either put
Code:
nameserver 8.8.8.8
in /etc/resolv.conf to try and bypass Adguard and see if that works - if it does - check Adguard configuration.
Back to top
View user's profile Send private message
3Nd_R1m
n00b
n00b


Joined: 28 Jul 2021
Posts: 27
Location: Quebec, Canada

PostPosted: Fri Jul 15, 2022 6:36 pm    Post subject: Reply with quote

pingtoo, glibc.
Code:

$ cat nsswitch.conf
aliases:    files
ethers:     files
group:      files
gshadow:    files
hosts:      files dns
netgroup:   files
networks:   files dns
passwd:     files
protocols:  files
publickey:  files
rpc:        files
shadow:     files
services:   files


freke,
ok, host resolution works now. I believe I can find a solution from this point - I'll probably just remove Adguard altogether.

Thanks, have a nice day.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum