I want to get IP address of website e.g., http://www.sssssss.vvv has IP address 111.22.3.4.
With Java SE we can get as below.
String ipAddrs = InetAddress.getByName("http://www.sssssss.vvv").getHostAddress();
Can anybody please tell me to get same thing with J2ME API.
I searched online for solution to this question, but no use.
Related
I started learning some website designing and I wonder how can I make my site adress look f. ex. like ender.com instead of IP address and port. I'm doing everything on my own computer, so I would really appreciate way, which will allow me to host a website on it. I'm a beginner, so I'd like to know if I'm even capable of doing this.
You need a domain name in which you're gonna host your website, in your case its ender.com, as you run your website from your own pc it shows your localhost and port instead of ender.com as you don't own that domain. Only way to show ender.com is that you buy that domain and host the website with that purchased domain.
Refer this for more info https://blog.resellerclub.com/how-to-host-a-domain-website-on-your-own/#:~:text=%20A%20few%20steps%20on%20how%20to%20host,may%20have%20issues%20here%20based%20on...%20More%20
I have used IIS to host a nodejs API in windows 11(followed these blogs: blog-1 and blog-2).
When following blog-1, setting the IP address to IPv6(i am not sure about this) makes the API available to all device.
Any other options choosen from the list of avail IP addresses leads to the API accessible only from the working pc where the API is hosted.
Why is this happening?
Also, when using the IPv6 address to reach the API, the url looks like this:
http://[5468:6483:7e05:6ea6:7c31:dd39:d7d2:f8b7] (Note: this is a mock url, does not work)
Here, what is the [] used for?
Note:
I don't have much knowledge about this topic, if the question needs any improvement please suggest edits.
Any suggestions gratefully accepted. Thanks in advance.
Is domain necessary for a website? Can't we see websites using the public ip address of the machine-like 65.2.10.98? I am unable to get a free domain name. I have tried freenom but it always shows domain not available. If it's necessary to have a domain please tell me a website from where I can get just a domain name for free because I have a Linux server up and running in AWS
Yes. You can use a public IP address for your website.
Domain names are solely meant for us humans to better find what we are looking for in the world wide web.
example.com is easier than 93.184.216.34.
But it is not a requirement to have a domain.
Although, I want to point out that IP addresses, especially IPv4 addresses are not as static as you think. You did not provide any details, but if you are not willing to pay for a domain I guess you are using the free tier EC2 instances. If you reboot/terminate such an instance, the IPv4 is likely to change. So your website is not available under the old IPv4 address anymore. Domains solve this problem because you can just point the domain to the new IPv4 address.
Since you are using AWS, and seems to not mind any form of domain name, try CloudFront. It will give you a default domain name like so:
http://d111111abcdef8.cloudfront.net/
You can configure your EC2 as the origin for the CloudFront distribution. It has added benefits of DDoS and CDN too.
It is not required to have a domain.
When it comes to freenom i have only use for small projects, you can get a free domain as long you renew it every 12 months and if dont mind the ".tk"
I need to use fail2ban due to many attack attempts on my server, I also have filters that I had to activate/create to block attack attempts.
But now I'm pretty sure that some google ip ends up in the jail of my fail2ban...
I added some ip in the ignoreip directive in the jail.local file, but they are only the ones that I managed to identify as real google ip in my access.log (I also have many fake google)
It would be nice to be able to give a list of ip to ignore to fail2ban, but google does not release its ip list, google says: https://support.google.com/webmasters/answer/80553?hl=en
So the question is: is it possible to do a reverse dns to understand if an ip belongs to google and tell fail2ban to ignore it?
Can it be done via fail2ban? Do you need any external script? Could it be too heavy, long and tiring for the server?
yes, you can identify google bots using reverse IP lookup.
all crawler bots will end with xxxxxx.google.com or xxxxxxx.googlebot.com
for e.g. crawl-203-208-60-1.googlebot.com
but it is not possible to identify in fail2ban, but you can whitelist the IP address once you know if its a Googlebot.
there are many ways to perform for reverse IP look.
you can use Python, Ruby or bash to find out. check the following article.
http://searchsignals.com/tutorials/reverse-dns-lookup/
there are websites that can find you reverse IP lookup.
https://dnschecker.org/reverse-dns.php
http://reverseip.domaintools.com/
if you can code in python, you easily dump reverse IP data in a file from a list of IP addresses.
Google does have a page about verifying GoogleBot addresses by doing a reverse-lookup on the IP address and verifying that it comes from a specific hostname (you'd then get the IP of that host, to double-check it comes back to the appropriate source IP).
There are also DNS TXT records that specify IP ranges for SPF (emails), Google Compute Cloud, and the wider Google IP addresses that can be used (many of which would be in use by GCP user's VMs and other services).
dig #8.8.8.8 +short TXT _spf.google.com
dig #8.8.8.8 +short TXT _cloud-netblocks.google.com
dig #8.8.8.8 +short TXT _cloud-netblocks.googleusercontent.com
The first query will return something like this:
"v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all"
And you would then parse it to get the IP address ranges, or do a sub-query on the include:_netblocks.google.com etc to get other sets.
The information these records are not fixed, and can regularly change. (AWS publishes a .JSON file with several updates per week, for example).
I'm working on a system to automatically detect 'lying user-agents', with these, and some other techniques.
My website suddenly stopped working.
When I search for the domain name in WHOIS websites it is showing the correct server ip address and correct DNS IP address.
I can reach the website by its IP address but somehow when I am trying the domain name in browser its not working and its showing "This site can’t be reached"!
There is no error in my server log.
I tried different browsers and different systems and it is same issue.
I am really confused. Even when I am sending GET requests with Postman to my domain, it not reachable but sending request to IP is working!
whois and DNS resolution are two separate things and one does not imply anything for the other, so in short, except in very specific cases, if you have a DNS resolution problem you should use DNS troubleshooting tools, not the whois and especially not web-based whois (the only relevant whois is the registry one).
Now you are giving so few details that noone can really help.
Among the possible ideas to check and probable problems:
you forgot to renew the domain, your registrar put it on hold or worse deleted it (that you can see in whois)
you did a change in the DNS resolution and now it does not work anymore, use online troubleshooting tools like Zonemaster or DNSViz; alternatively your registrar and/or webhosting company should be able to help (since you are neither giving here the domain name nor details about the troubleshooting you do: for DNS problems, the browser is not the first tool to use, look instead at dig).
in appear that the problem was DNS on our local system. we changed it to 8.8.8.8 and then we could access to our domain!
it's usually because you use an addon domain, not the main domain for hosting orders that are set up on cpanel whm