Cloudflare dynamic dns - cloudflare

Currently I am using No-Ip for my website and I wanted to use cloudflare for protection against ddos and bots. I noticed that you need a domain for cloudflare. Also I searched the web and found something called cloudflare ddns. I don't own a domain only the dynamic public ip of my home route. So how do I set up cloudflare without a domain?

Maybe you will be interested in Cloudflare Argo Tunnel.
A single command cloudflared tunnel --url localhost:80 will expose your webserver running on port 80 on your home server/PC to the internet. Cloudflare will generate a free subdomain under trycloudflare.com domain that your visitors can reach.

Related

Real IP address + port from cloudflare over nginx proxy manager to apache

I'm looking for a way to "pipe" the clients real IP address and port from Cloudflare over NGINX Proxy Manager to the main webserver apache.
The system is implemented in docker. The domain is configurated by cloudflare with proxy. I got a docker container with nginx that pipe the users requests to the apache container.
I want to log the original, real IP addresses AND the ports of users. I don't care where I pick up the data, whether it's from NGINX or Apache or, if necessary, from cloudflare. Preferably with the apache.
In PHP you get with:
$_SERVER['REMOTE_ADDR'] -> the IP address of the NGINX container (sure)
$_SERVER['HTTP_CF_CONNECTING_IP'] -> the real IP address of the user (what I want)
I don't know whether the original port is behind $_SERVER['REMOTE_PORT']. Probably not.
With Cloudflare there is the possibility to define additional fields in which the port could be passed through. How do I get to the field / the port.
Thanks a lot and best greetings
Mtz
A wasy to pipe the users original IP addresses and ports through Cloudflare and NGINX to apache (to log them).

Apache site configuration limit access by server IP

I've searched the internet, but I can only find information about blocking requests from certain IP-addresses of visitors. That's not what I'm looking for.
What do I want? Hence the following situation, I'm running an apache webserver hosting a website for https://example.com on public IPv4 address: 1.2.3.4
Visitors access the site by browsing to https://example.com, but the webserver is also listening to browser requests on the servers public IPv4 address 1.2.3.4, which also serves the site. How can I disable that Apache is serving the website over the server's public IPv4 address? I only want the site to be accessible over it's site-url / domain.

Ngrok with Cloudflare domain

I have purchased ngrok pro plan to use whitelabeled domains through cloudflare. But having trouble configuring end to end SSL encryption.
React app is running on localhost (http://localhost:3000).
created a domain (app.example.com) in ngrok.
added CNAME record for xxx.ngrok.io url in cloudflare for app.example.com.
SSL is enabled in cloudflare
https://app.example.com gives HTTP 520 error on cloudflare
cloudflare has universal certificate on *.example.com domain.
Is there anyway i can have https://app.example.com resolves to https://localhost:3000 through ngrok?
Here is one way, assuming you are fine with having Cloudflare only act as DNS:
Configure ngrok to serve the correct TLS certificate. In ngrok for your domain app.example.com, select the "Automated TLS certificates" option, which means ngrok will provision one for you.
In Cloudflare, "grey cloud the DNS record" so that traffic is no longer proxied through Cloudflare before it is proxied through ngrok. Now it will only be proxied through ngrok before being forwarded to your local server.
Start your ngrok tunnel. Assuming your local server is not configured to terminate TLS, you can run something like ngrok http --bind-tls=true --hostname=app.example.com 3000 to start a HTTPS only tunnel endpoint.
I was looking ngrok tunnel solution proposed and I also found a way you can do an Argo Tunnel through cloudflare directly. This can be another approach to the problem. https://developers.cloudflare.com/cloudflare-one/tutorials/share-new-site
I didn't answer your question. I just want to share, that we can make localhost on our computer accessible through our own domain using cloudflare tunneling.
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/

How to set DNS records for my domain to reference the IP address of my load balancer also getting FAILED_NOT_VISIBLE in LB Google Cloud Console

I am working with Load Balancing to have https to my static website and I have my domain in GoDaddy
I created a LoadBalancer with
Backend configuration: To my Cloud storage buckets & enabled CDN.
Frontend configuration: Https having static IP I have enabled
Google-managed SSL certificate with my domain example.com which is in GoDaddy.
Do I need to do any configuration in GoDaddy like pointing, After 10-20 min I get FAILED_NOT_VISIBLE in domain status
I am new and don't know how to link.
In google docs I can see DNS records for your domain must reference the IP address of your load balancer's target proxy, Can someone help me to understand.
https://cloud.google.com/load-balancing/docs/ssl-certificates?hl=en_US&_ga=2.190405227.-1195839345.1570257391#certificate-resource-status
Finally I fixed it, We need to point the Static IP to DNS in my case I have in GoDaddy, It took some time to point DNS and then it took time for my Google-managed SSL certificate to turn green.
Once it's done I hade an issue with err_ssl_version_or_cipher_mismatch for this we need to add Policy to tell LB to use TLS 1.2 but in my case it automatically resolved in 10 min.
We can Point DNS in two ways one by directly adding Static IP to A record in GoDaddy other is by creating a Cloud DNS in GCP and point Nameserver in Godaddy.
We must establish a link to confirm our DNS with Static IP of LB so that the SSL turns Green after confirming Domain status.

Should i enable Cloudflare for A records for my nameservers

I am using Cloudflare, and my domain is using their nameservers olga and duke.
I have A records for ns1.mydomain.com and ns2.mydomain.com and that is only thing which is revealing my real IP address, because i can not force clients to use CloudFlare. So I host their DNS.
If I enable CloudFlare for my NS1 & NS2 A records, will everything continue to work well?
Notice: NS1 and NS2 at registrar are will still be pointing to real IP address.
If you want to use Cloudflare you need to choose one of the following configurations:
Change your name servers at the registrar and use in Full mode,
Use via a hosting partner, or
Upgrade to BIZ and use a CNAME setup
Cloudflare Knowledge Base Article
Whilst Cloudflare can host the DNS records for your host - it will not proxy DNS records; Cloudflare will only proxy HTTP and HTTPS traffic.
If you wish to proxy DNS traffic you can use Cloudflare's Virtual DNS product. This acts as a firewall for your existing DNS infrastructure.