Cloudflare translates domain to Cloudflare public IP not my server public IP - dns

I have a server with public IP (ex: 172.34.12.69). I've configured Cloudflare to point the CNAME Record to Elastic Load Balancer DNS Name (mydomain.io -> DNS Name), and the ELB will forward it to my server. When I use ping to check the public IP, it points mydomain.io to Cloudflare's public IP:
PING mydomain.io (104.21.7.240): 56 data bytes
64 bytes from 104.21.7.240: icmp_seq=0 ttl=58 time=38.785 ms
64 bytes from 104.21.7.240: icmp_seq=1 ttl=58 time=39.165 ms
64 bytes from 104.21.7.240: icmp_seq=2 ttl=58 time=36.818 ms
When I use adb to connect the local android device like: adb connect mydomain.io:5555. The domain has been translated to Cloudflare's public IP so the connection could not be established. How can I translate the domain to my server's public ip ?

When you create any record in cloudflare do not use cloudflare proxy. (Turn orange arrow to grey). Doing that will remove cloudflare extra protection and dns record will point your server.

Related

DNS Name Server not accessible

I have built a FreeIPA nameserver that is accessible from within my internal network, however I am unable to get this working for external traffic.
My domain name server setting has been updated with my domain registrar to use my name server. The domain algobuilder.co.uk is set to use nameserver ns1.algobuilder.co.uk and my public static ip address (31.125.181.141). A simple ping from outside my network confirms that algobuilder.co.uk is resolving to my public static IP address.
It appears that external traffic is not using the nameserver ns1.algobuilder.co.uk to resolve to my nameserver. I have opened port 53 on my router and forwarded it to the internal ip address of my nameserver.
I need CertBot to be able to access my nameserver txt records, but it doesn't seem to be able to find them.
Any clues to what I am doing wrong. Thank you.

How to access the website via IP address without SSL error

When I'm accessing any host via IP address, it is showing SSL error.
Example.com => 192.168.1.1 (IP address)
Suppose if I want to access https://example.com, it works fine.
If on the other hand, accessing the hosts by its IP address like https://192.168.1.1, it shows SSL Error.
Is there any configuration missing here. Do I need to add the IP address in SAN configuration?
If you want to access a web site by IP address you need to first configure your web server to actually provide this web site on this IP address and then you have to include the IP address as SAN into the certificate served at this IP address. Note that there are different types of SAN: DNSName and IPAddress. The correct type would be IPAddress but some clients actually wrongly expect type DNSName - so you better add the IP address with both SAN types.

Split DNS to access server from internal and external network with same subdomain

I want to access my servers from the external as well as the internal network by accessing it with the same subdomain. Therefore, I hosted a private DNS server in my network to resolve the subdomain with the internal IP when a host from the internal network tries to resolve the subdomain. For the access of external networks I added CNAME entries to resolve the subdomain with the static public IP that I have. My configuration looks like this:
Public DNS Server (External)
A - mydomain.com - External IP
CNAME - www.mydomain.com - mydomain.com (301 Redirect)
CNAME - server1.mydomain.com - mydomain.com (301 Redirect)
CNAME - server2.mydomain.com - mydomain.com (301 Redirect)
Private DNS Server (Internal)
A - server1.mydomain.com - Internal IP of server 1
A - server2.mydomain.com - Internal IP of server 2
My question now is whether this is a good setup or not and whether this will have a bad effect for my website in the search engines. I need this because my rooter doesn't support NAT loopback and I need a workaround to access the servers internal and external with the same subdomain.
Your question is very general, you have 2 servers in internal, right?
if you have more than 1 ip public for your server,
just set:
A - server1.mydomain.com - IP Public 1
A - server2.mydomain.com - IP Public 2
on your router set dest NAT
from IP public 1 to Internal IP of server 1
from IP public 2 to Internal IP of server 2
and for internal, you just add server DNS local
your concept is good :
A - server1.mydomain.com - Internal IP of server 1
A - server2.mydomain.com - Internal IP of server 2
For client access DNS, in DHCP you set to your internal DNS, in your internal DNS just you can forward to public DNS
You can use BIND for DNS Server in Linux environment, or in windows server just add DNS server and configure.

DNS server to create hostname with any ip?

There was some public dns server that creates dns records on the fly, for example 127.0.0.1.something.com that resolves to 127.0.0.1, I searched a lot on Google but I can't find it. Any idea?
xip.io is gone as of June 2021.
http://nip.io is a working alternative. It works in a similar fashion to xip, so the information below is still valid (changing any references from xip.io to nip.io).
$ nslookup asdf.10.0.0.1.nip.io
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: asdf.10.0.0.1.nip.io
Address: 10.0.0.1
Original answer:
You are talking about http://xip.io/
What is xip.io?
xip.io is a magic domain name that provides wildcard DNS
for any IP address. Say your LAN IP address is 10.0.0.1.
Using xip.io,
10.0.0.1.xip.io resolves to 10.0.0.1
www.10.0.0.1.xip.io resolves to 10.0.0.1
mysite.10.0.0.1.xip.io resolves to 10.0.0.1
foo.bar.10.0.0.1.xip.io resolves to 10.0.0.1
...and so on. You can use these domains to access virtual
hosts on your development web server from devices on your
local network, like iPads, iPhones, and other computers.
No configuration required!
How does it work?
xip.io runs a custom DNS server on the public Internet.
When your computer looks up a xip.io domain, the xip.io
DNS server extracts the IP address from the domain and
sends it back in the response.
127.0.0.1 is loopback address, it is like localhost, always is your pc but that is not in a dns server.
If you want your pc accessible from internet and don't pay for a dns addres use dyndns or no-ip
the best part of this sites are that no mind if you have a dynamic ip they always point to your pc

I pointed the nameserver to my server ip adreess, configured NSD3 as DNS Server but the domain would not resolve. What am I doing wrong?

I am trying to set up my own nameserver on hp cloud VPS for the domain "appwared.com".
I added ns1.appwared.com from my registrar control panel to point to my server's public ip address.
I installed NSD3 as my DNS software and configured the zone files. It is up and running but as you may see, the domain is not resolving.
here you can see the zone file: http://pastebin.com/z0094kja
This is my first attempt to set up my own Name Server, maybe you can peoint out what I am doing wrong.
Thanks!
HP was blocking the UDP 53 port that used in DNS.

Resources