LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2017, 01:07 AM   #1
OstermanA
Member
 
Registered: Dec 2006
Location: Seattle, WA
Distribution: CentOS 8
Posts: 99

Rep: Reputation: 20
Ping/Curl automatically walking into my domain somehow?


I can't seem to find a Google search to pull this out of the sea that is the Internet, but here's a particularly odd problem I'm having:
Code:
[operator@capstoneos2 ~]$ hostname
capstoneos2.osterman.net
[operator@capstoneos2 ~]$ ping -c1 asdf
PING asdf.osterman.net (65.254.250.110) 56(84) bytes of data.
It appears that when ping/curl can't find something, it appends my domain to it and searches again. This comes back 403 because of how my domain provider handles things.

How, exactly, does it do this? I only really discovered this because it's causing `make check` to fail while compiling curl, but I'm interested to know the actual mechanism at work here.

Edit: I updated my domain (this is a test machine) to use a different domain hosted by a different provider, and it stopped. Again, though, I'm really interested in understanding the mechanism at work here, rather than solving this specific problem.

Last edited by OstermanA; 05-30-2017 at 01:09 AM.
 
Old 05-30-2017, 03:25 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,536

Rep: Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248
I do not really understand what is your problem, is this the name resolution or something else?
 
Old 05-31-2017, 01:09 AM   #3
OstermanA
Member
 
Registered: Dec 2006
Location: Seattle, WA
Distribution: CentOS 8
Posts: 99

Original Poster
Rep: Reputation: 20
When I ping an FQDN that doesn't exist, in the example "asdf", ping and curl would automatically attempt to append my domain name (osterman.net) to the end and connect to that. Due to some dumb things my host does this was causing a 403 on urls that shouldn't exist.

What mechanism is it using to append the domain name on it and how do I configure that? Is there a searchlist configured somewhere?
 
Old 05-31-2017, 01:36 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,536

Rep: Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248Reputation: 7248
probably you mean /etc/resolv.conf
see also man resolv.conf
 
Old 06-01-2017, 03:44 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,689

Rep: Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206Reputation: 2206
Quote:
Originally Posted by OstermanA View Post
When I ping an FQDN that doesn't exist, in the example "asdf", ping and curl would automatically attempt to append my domain name (osterman.net) to the end and connect to that. Due to some dumb things my host does this was causing a 403 on urls that shouldn't exist.
What pan64 said...but I can't resist saying..."asdf" is not an FQDN. A fully qualified domain name would include, at a minumum, a name followed by a dot and a top level domain (TLD); com or net or a gazillion others these days.
 
Old 06-02-2017, 12:50 AM   #6
OstermanA
Member
 
Registered: Dec 2006
Location: Seattle, WA
Distribution: CentOS 8
Posts: 99

Original Poster
Rep: Reputation: 20
Well. "asdf" is as much an FQDN as "com" is. The trick is, it doesn't exist. :P
 
Old 06-02-2017, 03:26 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,893

Rep: Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616Reputation: 3616
I forget why this does this but it has happened for a long time and for a reason.

" it appends my domain to it and searches again"

In a way that is correct, I think more accurately it looks to maybe 4 places for how to resolve a name then when it gets to a first choice that matches it uses it.

asdf is really being added since it doesn't (I assume) in any of the 4 places to look to resolve. The system then does add it to that domain.

It is working correctly if one setting is set to do that. Here is where I forget where that setting is.
 
  


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 automatically forward email from private.domain to different.domain vRanger Linux - Server 1 07-26-2016 12:09 AM
can't ping domain name, but can ping ip address dtra Linux - Networking 4 04-03-2013 06:02 PM
Can not ping domain name AlphaLan Linux - Networking 7 10-14-2012 01:24 PM
ProxyServer: how to ping,nslookup,wget,curl etc from client PC ~=gr3p=~ Linux - Networking 2 06-10-2005 08:16 AM
resume curl automatically on MP3 stream fail webagogue Linux - General 0 05-29-2005 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 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