How to add a * DNS entry to the etc/hosts file in Centos?

How to add a * DNS entry to the etc/hosts file in Centos? This is to allow S3 calls to a cloudian instance.
LVL 1
ol muserTechnology GeneralistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
The only entry that can be added to the /etc/hosts file is (an A record)
Ip.  Name
192.168.0.2 myserver myserver.mydomain.com


Once saved access attempt to either myserver or myserver.mydomain.com will translate to 192.168.0.2

Replace the IPA d name to match the destination for IP and the name in the configuration.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ol muserTechnology GeneralistAuthor Commented:
Can you please elaborate on the last paragraph please? What's the IPA d name? Which configuration file are we talking about?
arnoldCommented:
Autocorrection gone ..


Replace the IP in the example with the IP to which you need the name in the configuration.

Your cloudian instance reference name to the ip to which it should be connected.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You said, "How to add a * DNS entry" + since there's no such thing as * records, provide more clarification by posting exact records you're trying to add to DNS.

Keep in mine, as arnold said above, you can only add A records... so a normal /etc/hosts file entry will look something like...

1.1.1.1 foo.com www.foo.com

Open in new window


This is the only type of entry /etc/hosts supports.

All other DNS records must serve from real DNS server, so CNAMEs + TXT + MX + etc... - must live in a real DNS server.
nociSoftware EngineerCommented:
The bind DNS server has a method to add a * to a zone, then it will answer all non-matching queries with that record.
So it's a function of the DNS server, not the resolver library. The resolver can query /etc/hosts as alternative to DNS, queries for (A, AAAA, PTR) records.  As such the resolver does not synthesize answers.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AWS

From novice to tech pro — start learning today.