Request Yahoo Web Service With IP Not Domain - web-services

i am trying to access yahoo exchange currency web service with IP instead of domain name an the following error message is returned :
"The service's server DNS address could not be found."
When access URL with domain name it returns data as following :
http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote
When try to access it with IP it returns the above message :
http:// 208.71.44.31/webservice/v1/symbols/allcurrencies/quote
regards.

Related

Cloud run service cannot resolve custom domain mapped to a different cloud run service

I am running a Go server on cloud run which makes REST HTTP calls to a different public cloud run service B. When using custom domain mapping for service B, any requests to it error out with the following:
Get https://<mydomain_name>/api/health: dial tcp: lookup <mydomain_name> on 169.254.169.254:53: no such host
However, the requests work when using the automatically allocated cloud run URL instead e.g (https://<myservice_name>-xxxxxxx-ew.a.run.app)
I am able to access the mapped domain name on the browser and I can successfully dig it from my local terminal, from instances on different google cloud projects and from the cloud shell instance. However, querying the domain name servers for the domain name on any instances on the google cloud project hosting service B does not return correct results (fails with NXDOMAIN status).
To me it seems the domain is mapped correctly but I am not sure what is preventing my attempts to access the service using the domain name in code or using curl within the same google cloud project.
Any help will be appreciated.
NXDOMAIN is the internet’s blunt way of saying “the answer to your question doesn’t exist”. Technically, it’s saying that the domain name referenced in the Domain name System(DNS) query does not exist. NXDOMAIN, which stands for non-existent domain, is an answer that only an authoritative nameserver can return.
If you issue a query for a domain name that does not exist, Google Public DNS always returns an NXDOMAIN record, as per the DNS protocol standards. The browser should show this response as a DNS error.
On the other hand, if the domain name exists, nameservers and DNS resolvers will work to return the positive NOERROR response. The specific IP address answer to the DNS query will be returned as well. (It is also possible to receive a NOERROR response without any specific answers. This happens if the domain exists, but not the DNS record type requested.)
If, instead, you receive any response other than an error message (for example, you are redirected to another page), this could be the result of the following:
A client-side application such as a browser plug-in is displaying an alternate page for a non-existent domain.
Some ISPs may intercept and replace all NXDOMAIN responses with responses that lead to their own servers. If you are concerned that your ISP is intercepting Google Public DNS requests or responses, you should contact your ISP.

ALB access logs request initiator domain

is there any way to retrieve the user client domain from the ALB access logs?
from AWS documantation there is a 'domain_name' attribute but it is indicates the requested server domain rather than the client domain.
i know that in nginx there is a domain attribute which indicates the domain of the client,
is there a way to retrieve client domain from the alb?.
As you've pointed out, ALB access logs do not provide client's dns name. Instead they return:
client:port - The IP address and port of the requesting client.
Thus, to get the domain name of the client, you would have to parse the logs, and "manually" get the domain based on the IP. For example, if python is used, there is gethostbyaddr which can be useful in getting the domain name from an IP address.

Redirecting my website to another website in Route53

I want to know how can I redirect my website to another website (through domain name or IP address) using AWS Route53.
What I have done so far is,
1) I have bought a domain name.
2) I have generated AWS Route53 Name servers (NS) for the website and registered these NS on the domain name provider.
Now, suppose my website name is thisnewsite.com and I want that when users put thisnewsite.com or www.thisnewsite.com on browser, they should be redirected to
1)some other website, for example, www.flaticon.com, or
2)some IP address like xxx.xxx.xxx.xxx, or
3)some IP address with port like xxx.xxx.xxx.xxx:xxx
What is the Route53 method to do this?
1) For URL forwarding, see this answer: https://stackoverflow.com/a/14289082/902751
2) For IP redirect, create a record set of type A - IPv4 address that maps your host name to your IP address. This is an example (for EC2, but it will work for any IP): https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html
3) For IP redirect with port: Route 53 cannot do that. In fact, DNS in general does not care about port. It only maps domain names to IP addresses. A potential solution would be set up a proxy that would redirect your request from port A to port B.

Which IP address should I put on 'Server IP Whitelist' facebook developer console? (400 error from Facebook)

I'm building oauth2 facebook authorization and the errors prints "This IP address is not on the Server IP whitelist"
Is the 'IP address' referring to my public ip address or my localhost?
I put both but I'm getting still same error.
From Facebook Developer Console > Advanced,
Server IP Whitelist: 10.0.2.2, 223.108.215.xxx <- replaced numbers with x
Update Settings IP Whitelist: 223.108.215.xxx
Which IP address should I put? Thanks
In Facebook API you can put localhost also (http://localhost:8000) in SITE_URL. It worked for me when I tried. Unlike Twitter or Google API where it works only with production server.
And you don't need to add server IP whitelist to make app working.

Amazon EC2 instance hosting

I have a application hosted in amazon EC2 instance. My application runs at http://ec2...compute-1.amazonaws.com/index.html. We also have a domain registered as sovan.test.com. WE want to use Route53 for redirect/open http://ec2...compute URL when user used the registered domain name. How can we do this?
We are getting an error that we can not host anything with index as back. and also it do not detect http:.
Please give some advice.
Thanks
Amazon Route53 is a Domain Name Service, which can resolve names into IP addresses. For example, if a user types www.foo.com, it can return the IP address of a web server of load balancer that will respond to a request.
Note that is only resolves the domain, which is the initial part of an address. It does not resolve the path portion of a URL. For example, going to www.foo.com/index.html will result in resolving www.foo.com to an IP address, then sending a request for the index.html page to that server. The index.html portion is not part of the DNS resolution.