How can i manage many servers in just one domain like google and facebook - dns

My problem is how can i manage my servers in different ips using just using one domain and same name such as google Have many servers but using just one domain like gmail , youtube and cloud .
How can i make it happen

This is done by adding in front of all the servers load balance. And assign the domain to this LB.
Also you can add resolve to the same hostname as many IP addresses. (try to exec nslookup google.com and you will see)
For loadbalancing mail servers you can play with weight parameter in MX records in DNS

Related

Nodejs - What does it actually means to deploy a website on a domain and how to do it?

I am a bit new to the deployment of a website. I have a server which is written in Node.js. Previously I had been using Heroku for deploying my apps without knowing much about deployment. I would like to know how do I deploy my server to create a website which has .com at the end of it like www.example.com and not www.example.herokuapp.com. I think it has something to do with domains (correct me if I am wrong). I would like to know what exactly is a domain and a DNS provider and how to deploy a website in such a way. Thank you.
You should ask one question to yourself when you hit www.example.com in browser how does it load a page?. When you run a website on your laptop it basically runs locally, if you want to access your website over the internet you would require public IP(host or server) accessible over the internet so you can access a webpage using public IP:port. But this is not the best option because IP may change in the future and also remembering IP for each application will be difficult. Imagine if you access Facebook, Instagram or any other websites by its IP addresses how difficult and inconvenient would it be? There are a couple of things you should know.
DNS-> Domain Name system
Every host is identified by the IP address but remembering numbers is
very difficult for the people and also the IP addresses are not static
therefore, a mapping is required to change the domain name to IP
address. So DNS is used to convert the domain name of the websites to
their numerical IP address.
DNS is a hostname to IP address translation service. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers.
Name servers
Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. This is necessary because, although domain names are easy for people to remember, computers or machines, access websites based on IP addresses.
DNS record
A domain name, IP address what is the validity?? what is the time to live ?? and all the information related to that domain name.
Once you understand the DNS
Host(Deploy) your website to Amazon EC2 or Heroku and obtain Public IP.
Buy a domain from domain provider like Godaddy
Map domain(ie www.example.com to IP)-> DNS record
Mapping domain to IP may vary platform to platform but the Core principle remains the same. I would suggest you these below link. Try to find differences in both, doing so you will learn along the way
http://www.littlebigextra.com/map-domain-name-amazon-aws-ec2-instance/
https://medium.com/progress-on-ios-development/connecting-an-ec2-instance-with-a-godaddy-domain-e74ff190c233

How does CrimeFlare find the origin ip address of a Cloudflare website?

I am getting a bit into protecting my website but someone keeps posting the origin-ip of my website. I've found out that this website is exposing it: http://www.crimeflare.org:82/cfs.html
after some extra research I found that this site has been online for a couple years but no info on how it is made or what technique it uses. Does anyone have a clue how this website gets the direct-connection IP address? Thanks in advance.
I can answer this question. It's really all due to domain history in a nutshell. In order to avoid domain history fetching websites, so-called CloudFlare resolvers and Crimeflare, you need to change your origin IP while under the banner of CloudFlare. Then to stay hidden you MUST not use the email services from your domain otherwise a simple MX record lookup will expose your origin IP. So this means you now need to use third-party email services. If you are using a VPS or bare metal you need to setup IPtables so that ALL IPs are blocked and just allow CloudFlare's IPs. This way IP scanners like Censys can't find your origin IP either since all IPs would be blocked except CloudFlare's forcing all connections to go through CloudFlare. Thankfully CloudFlare IPs don't change that often and they do publish the IP list at their website.
If you are using a shared account you'll want to make sure your shared account uses a shared IP and not a unique IP. With a shared IP your website is mixed with others and these CloudFlare resolver websites can't distinguish between who's who to get your origin IP.
There are some other very minor trivial things to also consider. One trivial possible vector for origin IP exposure is allowing remote content to be published via the website. Be it a remote avatar or file. The link used from this remote content has the possibility of resolving your origin IP behind CloudFlare.
If you are using a shared account you can help block direct IP connections and keep all connections going through CloudFlare in one of two ways. In an Apache or Litespeed SAPI, add the following to your htaccess file:
RewriteCond %{HTTP:CF-IPCountry} ^$
RewriteRule ^ - [F,L]
What that code does is check for the CloudFlare Geo location header in the request from CloudFlare and if not present the user gets a 403. Thus all connections must go through CloudFlare. In order for this to work, the IP Geo Location option has to be turned on in your CloudFlare dashboard under Network.
The other really unique and awesome way of doing this is by using CloudFlare Workers. You can read about that here: https://community.cloudflare.com/t/stop-cloudflare-bypassing-on-shared-hosting/91203
I use all of these methods myself with my websites minus the fact of not using a VPS. So far my origin IP is not shown in Crimeflare or other websites.
Best of luck.
They very much explain it on that very site:
There are sites on the web that specialize in collecting registration and nameserver data. [..] CloudFlare maintains around 391 nameservers, and customers must change the nameservers on their registration in order to use most services. Each customer's domain is assigned two nameservers. This makes it easier to verify which domains depend on CloudFlare, and helps us keep our domain lists relatively current.
In other words, they look at public nameserver data and filter out the domains that have their nameservers pointed at one of CloudFlare's nameservers.

hMailServer with Domain - WAMP

I came into a struggle the last few days.
Using WAMP Server and following this Tutorial I set up a local email environment, and I wanted to make the emails reach accounts outside of the local host.
I heard you need to make some changes in the DNS zone, so here is my DNS Zone at Freenom.
Is is possible to make emails sent from a computer using hMailServer reach the outside world through a domain?
Thank you for your time.
It is possible but it depends on your Scenario.
If you are behind a Router or a NAT or a Dynamic IP-Address it's almost not possible
to run a real World sending SMTP-Server and you shouldn't
If you have a Hosting plan (your own Windows V-Server or Root server) with Remote Desktop
access and a static ip address it's and access to the DNS-Configuration of your Internet Domain, it is possible and recommended.
1) First you need to setup a DNS A Record which points to your static IP in DNS
2) You need to create DNS MX Record which points to your A Record
Now you can add a new hMailServer Domain and add accounts and sent Emails
out. But you should setup a DNS A Record for IMAP or POP3 as well so you can
Receive Emails and not only sending.

Curiosity about DNS using dig command

I am curious, I am analyzing the DNS section for the website imgur.com. My doubt is that when I run "dig imgur.com" dig only returns an IP address, if I run again the same command dig returns another IP address or sometimes the same.
Another question:
By using dig www.imgur.com get a CNAME to another domain, is this normal?, Can someone explain to me?
Thanks
You should check Round-robin DNS.
Round Robin DNS is a technique of load distribution, load balancing,
or fault-tolerance provisioning multiple, redundant Internet Protocol
service hosts, e.g., Web server, FTP servers, by managing the Domain
Name System's (DNS) responses to address requests from client
computers according to an appropriate statistical model.
In its simplest implementation, Round-robin DNS works by responding to
DNS requests not only with a single potential IP address, but with one
out of a list of potential IP addresses corresponding to several
servers that host identical services. The order in which IP addresses
from the list are returned is the basis for the term round robin. With
each DNS response, the IP address sequence in the list is permuted.
Usually, basic IP clients attempt connections with the first address
returned from a DNS query, so that on different connection attempts,
clients would receive service from different providers, thus
distributing the overall load among servers.

How to map domain to hosting server

My client have a dedicated server on liquedweb cloud service and we my web app is hosted on that server. We want our users to map their domain to our server. So they can enjoy our web app by using their domain name. What information I need to provide to my user so he can map domain and what information I need from them?
I don't know much(in fact anything) about domain mapping
thanks
It depends if the server has a dedicated IP address or is natted.
If the server has a dedicated IP address you can ask your clients to point their entire domain to you server by adding the following A records:
Host TTL Protocol Type IP Address
# 300 IN A 1.1.1.1
www 300 IN A 1.1.1.1
Not all domain hosts ask for TTL,if not dont worry about it.
If you want just their subdomain to point to your server (subdomain.website.com)
subdomain IN A 0.0.0.1
TTL is optional in some systems, in this case the default will be used.
Generally it is recommended that you use an IP for the Apex record and not a domain name. EG: example.com is the apex, www.example.com is the www subdomain.
A typical configuration would be below:
Host TTL Protocol Type Result
# 300 IN A 1.1.1.1
www 300 IN CNAME example.com
This is the same config as the top example but using CNAME example.com. It is the same as using A 1.1.1.1, it just means you only need to change one record.
If your server details are a hostname and not an IP address, most systems will not let you use the hostname for the apex so you will need to find out the IP address. (A simple method is to use the nslookup command or dig command).
TTL is how long in seconds a record last before it expires. If you are unsure what you are doing I recommend lowering this so you can correct mistakes more quickly.
Different methods for the different servers. For most of the servers, you have to change the nameservers of your domain.
This mostly needs when your domain registrar and hosting provider both are different.
First Login into your hosting account, navigate to the account details,
then copy the nameservers from there...which would be like :- dns1.hostingprovider.com
dns2.hostingprovider.com
After that, Go to control panel of your domain. Navigate to the nameservers
You will see the link:- dns1.domainregistrar.com
dns2.domainregistrar.com
Paste the above links at the place of below links.
They need the IP address (and possibly instructions on how to configure their DNS servers (which means a variety of different sets of instructions for different servers and control panels)).
You need the domain name.

Resources