Domain configured through Amazon Route 53 not working - amazon-route53

I configured Route 53 for my aws ec2 instance.
I can access my Tomcat server hosted in ec2 instance through elastic IP. It works.
But it's been more than 48hours I configured domain name in route 53 using my elastic ip, but still I am not able to access through my domain name www.wcam.com:8080.
My instance ID : i-773eeaaf
Elastic IP : 52.25.251.3
Public DNS : ec2-52-25-251-3.us-west-2.compute.amazonaws.com
I use to access my application in aws like this
ec2-52-25-251-3.us-west-2.compute.amazonaws.com:8080
or
52.25.251.3:8080
and I wanted to access like this www.wcam.com:8080 (which is not working).

It doesn't look like wcam.com is delegated to Route 53 [1]. You will need to update your registrar to delegate wcam.com to Route 53.
http://digwebinterface.com/?hostnames=www.wcam.com&type=&trace=on&ns=resolver&useresolver=8.8.4.4&nameservers=

Related

Why can't App Engine connect to Compute Engine VM instance?

I have a VM instance (e2-micro) on GCP running with postgres. I added my own external ip address to pg_hba.conf so I can connect to the database on my local machine. Next to that I have a nodeJS application which I want to connect to that database. Locally that works, the application can connect to the database on the VM instance. But when I deploy the app to GCP I get a 500 Server Error when I try to visit the page in the browser.
These are the things I already did/tried:
Created a Firewall rule to allow connections on my own external ip address
Created a VPC connector and added that connector to my app.yaml
Made sure everything is in the same project and region (europe-west1)
If I allow all ip addresses on my VM instance with 0.0.0.0/0 then App Engine can connect, so my guess is that I'm doing something wrong the connector? I use 10.8.0.0/28 as ip range while the internal ip address of the VM instance is 10.132.0.2, is that an issue? I tried an ip range with 10.0.0.0 but that also didn't work.
First check if your app uses a /28 IP address range (see the documentation):
When you create a connector, you also assign it an IP range. Traffic
sent through the connector into your VPC network will originate from
an address in this range. The IP range must be a CIDR /28 range that
is not already reserved in your VPC network.
When you create a VPC connector a proper firewall rulle is also created to allow traffic:
An implicit firewall rule with priority 1000 is created on your VPC
network to allow ingress from the connector's IP range to all
destinations in the network.
As you wrote yourself when you create a rule that allows traffic from any IP it works (your app can connect). So - look for the rule that allows traffic from the IP range that your app is in - if it's not there create it.
Or - you can connect your app to your DB over public IP's - in such case you also have to create a proper rule that will allow the traffic from the app to DB.
Second - check the IP of the DB that app uses.
My guess is that you didn't change the IP of the DB (that app uses) and it tries to connect not via VPC connector but via external IP and that's why it cannot (and works only when you create a firewall rule).
This answer pointed me in the right direction: https://stackoverflow.com/a/64161504/3323605.
I needed to deploy my app with
gcloud beta app deploy
since the VPC connector method was on beta. Also, I tried to connect to the external IP in my app.yaml but that needed to be the internal IP ofcourse.

GKE Kubernetes external domain provider

I built simple cluster in GKE with two services using this tutorial
https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app
After finishing that I'm able to access my service using external IP address. So I bought domain for using this IP address. After setup A record in DNS settings to that IP address, domain doesn't work, it still loads and then show ERR_CONNECTION_TIMED_OUT. Do I need to do something in google console, or how I can make this IP public and accessed through domain?
Please refer to official documentation, which describes steps you need to take to configure domain names with static IP.
There are steps that you need to cover:
Go to NETWORKING section at GCP console, than VPC Network -> External IP addresses to ensure that you are running static IP address, not ephemeral one.
Go to Network services -> Cloud DNS. You need to create DNS zone, where at DNS name line you have to wright your domain name. After creation you will see Add record set, where you need to paste your external IP address.
There is also a good tutorial at YouTube with setting up custom domain on GCP. Let me know if it works for you.

access the google compute server with a subdomain rather than external IP address

I created a VM instance and deployed my application. I can access the application through the given external IP address, but I want to access it with some domain, just like openshift provides a domain AAA.rhcloud.com, which we can use the access the projects from the VM.
Is it possible to do it easily without normal DNS and CNAME route?
Thanks,
Manish
Most IP addresses have a DNS address than you can find out with reverse DNS:
$ dig +short -x 104.197.1.2
2.1.197.104.bc.googleusercontent.com.
As you can see on GCE you can reverse the IP address and append bc.googleusercontent.com. Of course this is no easier to remember than the IP address itself.
Between GCE instances in the same project, you can also use INSTANCE_NAME.c.PROJECT_ID.internal, but this won't work from outside GCE.

OpenShift Origin Route Hostname not accessible

I have a query which is basically a clarification regarding Routes in OpenShift Origin.
I managed to setup OpenShift Origin version 1.4.0-rc1 on a CentOS hosted in local VMWare installation. Am also able to pull and setup image for nginx and pod status shows Running. Able to access nginx on the service endpoint also. Now as per documentations if I want to access this nginx instance outside the hosted system I need to create a Route, which I also did.
Confusion is on the Create Route screen from OpenShift Web Console it generates a hostname or allows to enter a hostname. Both of the option i tried, generated hostname seems to be a a long subdomain kind of hostname and it doesn't work. What I mean is I'm not able to access this hostname from anywhere in the network including the hosting OS as well.
To summarize, service endpoints which looks like 172.x.x.x is working on the local machine which is hosting OpenShift. But the generated/entered hostname for the route doesn't work from anywhere.
Please clarify the idea behind this route concept and how could one access a service from outside the host machine (Part of same network)
As stated in documentation:
An OpenShift Origin route exposes a service at a host name, like
www.example.com, so that external clients can reach it by name. DNS
resolution for a host name is handled separately from routing; your
administrator may have configured a cloud domain that will always
correctly resolve to the OpenShift Origin router, or if using an
unrelated host name you may need to modify its DNS records
independently to resolve to the router.
It is important to notice the difference between "route" and "router". The Opensfhit router (that is mentioned above)listens to all requests to Openshift deployed applications, and has to be previoulsy deployed, in order for routes to work.
https://docs.openshift.org/latest/architecture/core_concepts/routes.html
So once you have the router deployed and working, all routes that you create in openshift should resolve where that Openshift router is listening. For example, configuring your DNS with a wildcard (this is dnsmaq wildcard example):
address=/.yourdomain.com/107.117.239.50
This way all your "routes" to services should be like this:
service1.yourdomain.com
service2.yourdomain.com
...
Hope this helps

Can't redirect Route 53 registered domain to IP address in S3 bucket

What I want to do:
I am trying to set up routing from a website that I registered with aws route 53 to an IP address that is outside of amazon servers (my home ip address).
Problem:
My route 53 website will not redirect to destination set in an S3 bucket.
Things I have done:
Register domain with Route 53 (let's call it mywebsite.net)
Create an S3 Bucket called mywebsite.net
Set the bucket so it Redirects all requests to another host name to mywebsite.net
Create a public hosted zone for mywebsite.net called mywebsite.net
Add a record to the zone with default name mywebsite.net
Set the record type to A - IPv4 address
Set Alias to Yes
Set Alias Target to the bucket called mywebsite.net
Left remaining options to their defaults
Things that work:
The bucket endpoint properly redirects to desired url
Things that Don't work:
The domain registered with route 53 does not resolve/work at all
Other information:
When I go into terminal and execute the command curl -i mywebsite.net
it prints curl: (6) Couldn't resolve host 'mywebsite.net'
Route 53 domains (as a registrar) should work exactly like a domain at any other registrator.
Let's pretend your home public IP is 123.50.50.123.
Verify that by opening a browser from INSIDE of your house and going to http://www.ipchicken.com
Can you ping 123.50.50.123 from OUTSIDE of your house? If Yes, then we can expect a PING on the domain to work once it is configured.If No, then your domain won't ping either.
Login to AWS Route 53 and setup an A record that has one IP, your public IP, that you verified.
123.50.50.123
Now wait... DNS changes are not immediate. It could be 5 minutes. It could be 24 hours if you are behind a DNS server that keeps its cache for a long time.
How will you know when the Domain DNS is setup correctly?
Check it out on http://www.mxtoolbox.com
in their search box put
a:yournewdomainname.com
Here's the result for Wikipedia "a:wikipedia.com". It should look similar. With the "IP Address" being your home public IP from earlier.
When everything is done.
You should be able to PING your domain (if PINGing the IP address worked)
Then you need to setup whatever servers that you wanted this domain for in the first place.