Nameservers with CloudFlare [closed]

I want to make a hosting service but I don’t want to expose my IP address.
So, I set my account up at cloudflare and setup the DNS records on cloudflare and set my host up.
But now, I can’t seem to get the nameservers up without getting my IP exposed.
The record I have right now is

Type          Name         Destination
A             ns1          My public IP
A             ns2          My public IP
A             @            My public IP
CNAME         www          My public IP

If I disable cloudflare on my nameservers, the nameservers work fine.
How can I make this work, or is it impossible?

Answer

Haha, I feel sorry to see your question got voted down. But I think it is legit question as those DNS stuff is so confusing and it is pain to learn, and even after you understand it, easy to forget.

I have setup server website, like 10, via cloudFlare but still hate doing those configs.

Now, there are 2-3 things you need to do.

1/ Go to cloudflare, setup your new website with a domain ( which you already purchased somewhere). You don’t need your website (source code, DB and stuff) up and running at this point. If you do it right ( it is quite easy, just next and next), their should give your 2 nameservers

2/ Go to Your domain name provider. Login there, and set your nameserver to external nameservers, then put those 2 nameservers in step 1.

3/ Now, get your hosting ready, then paste the IP into DNS records, which is different than nameservers.

Now your IP should be quite private to you and cloudflare only. As most user will only see Cloudflare IP (which is the proxy, load balance for your website)

Hope I won’t make you confuse even more. And not sure it is as clear as Cloudflare guide, lol
https://support.cloudflare.com/hc/en-us/articles/205195708-Step-3-Change-your-domain-name-servers-to-Cloudflare

P/S: welcome to the painful world of webmaster, lol. Greetings from someone who have 10+ y of software/web development.

Attribution
Source : Link , Question Author : Min Gu Kang , Answer Author : Phung D. An

Leave a Comment