I am trying to set up what is possibly a webserver that can detect the IP addresses of the clients that try to access the webpage. In the simplest terms.
1)Let there be a table on the website.
2)Each time a client requests the website, its IP address gets added to the entry of the table.
I have made a webserver before using apache tomcat and even nodejs. But I have no idea how to detect IP adresses. I would also like to know if its possible to set this up online, in the cheapest possible way.
Perhaps nodejs would work using request.connection.remoteAddress, as in this example.
Related
I am a PHP coder but not a server expert so I wondered if anyone could answer the following query.
Is there a way that a bot can determine the IP of my server when it runs through Cloudflare?
Someone suggested that folk could try ftp.domain.com and things like that. I do not have that setup on my server although Cloudflare do set this up automatically for you when you register a domain.
If you are a server expert and wanted to determine the actual IP of a server, how would you go about it?
Thanks.
PS: I do not want my IP public, hence the question.
Someone that really wants to find your server IP address probably can. We're only going to really stop basic lookups from returning your IPs, but we can only proxy web traffic & some records on your domain (mail, for example) may still return your server IP.
We do have some tips on minimizing the probability that someone could find it easily with these guidelines.
I have to automatically find web servers in certain ip range
It should not look like attack so I cannot use ping, curl, lynx. I cannot also use reverse dns.
The other approach is using search engine like google or bing. I can search by putting ip in search box later I can check if address contains ip then I know that is web server.
But google not returns useful data. For example for ip 212.77.100.101 (which is web server) does not return useful results, any of them on results web page does not contain 212.77.100.101 on address (https://www.google.pl/search?q=212.77.100.101).
Is there any other solution to that problem or is there any search engine to use?
This would really depend on a lot of factors. Your going to need some scripting heft to search through straight up google results for the information you want. Plus what do you mean by server? Just like a regular ole website server? You could probably utilize arin whois in some way to query ip addresses and any belonging to google, yahoo, etc etc you could identify as a LIKELY server IP address. If your looking to see if it's a server based on more technical information like OS, ports, etc etc there isn't much you'll likely find on google.
For instance an ARIN WHOIS of a google ip comes to this, http://whois.arin.net/rest/net/NET-74-125-0-0-1/pft . Using your preference of language you could probably make the query to the web page and have it return the DOM or w/e to a variable and then look for the element that would have identifying information such as a google designation under name or something to that effect.
The best way to really tell, AFAIK, is to check ports and other techniques, which you cannot do by the sound of it. I'm not aware of a database you can access either that would have that information by IP address either...
What do you mean by server? That would help narrow down what your looking to accomplish. Just any IP serving up some sort of data? Or anything that comes back to a linux box or something?
More detail! :D
I'm currently writing a desktop application that integrates facebook using the graph API. I'd like to implement real-time updates (http://developers.facebook.com/docs/api/realtime/), but in the doc it say's that you have to establish a http server that facebook will address to send the updates to. My problem is now that my box is sitting behind a router with only one IP-address (so the router uses NAT).
Will it still be possible for facebook to contact my webserver for sending me updates?
#kohlehydrat: Every webserver needs to have an IP address that can be reached from "anywhere" on the internet. Since your webserver is sitting behind a NAT with only one IP, I seriously doubt Facebook can reach your webserver.
However, see if you can configure the NAT in such a way to reserve a dedicated port for your application.
For example:
10.122.48.222:4231
traffic to port 4231 is directed towards your application.
10.122.48.222 is outward facing NAT IP address.
I am not sure if we can do this, but its an idea.
The router should catch port 80 requests (or whatever port your webserver is supposed to listen on) and forward it to your internal computer port 80, preferably in a consistent NAT style.
Basically, IP based communication with proper routing should not be an issue if both parties can find each other.
You Need to Do what is called as "PORT FORWARDING".
I had a similar issue initially, Then I forwarded my port where in my IP was Made Public from being local only to the company.
And now my issue is solved.
hope this helps.
this question is already closed, but since you have not received this particular answer (which is what I believe most facebook developers do in order to develop behind firewalls) I will post it here:
You can reverse tunnel your machine to any machine with a publically available ip.
see blog post on this topic
in a lot of facebook sdks, this functionality is even included ( for instance, facebooker, a ruby gem provides the functionality to rake facebooker:tunnel:start after you setup the appropriate settings)
I'm researching how to code an iPhone app that needs to connect to an online service to get data. The online service only provides access to specified IP addresses or ranges, so iPhones won't be able to connect directly, and the request will have to go through a server. I looked into setting up my own forward proxy server (which the service in question are happy with, by the way), which I guess would do the job for most other platforms. Unfortunately the iPhone does not seem to allow configuring a proxy address programmatically. Is there another potential solution for accessing the content from an intermediate server, that would show the online service the IP address of the server, rather than each individual iPhone?
Many thanks
Steve
It appears that using cURL is one way to achieve this. There should be bindings available for Cocoa.
I'll let people know how it goes in the comments.
Steve
I have a different but similar question. I have a dynamic dns account where I map my machine's dynamic IP to an address say, www.xxx.yyy.net
Now, I have registered another short domain name say www.yyy.com, the hosting is on a linux server.
Now, my machine is actually a webserver which runs .net website which can be accessed by www.xxx.yyy.net I need my homepage(index.php) in my www.yyy.com handle the redirection in a way that the pages to be loaded from www.xxx.yyy.net/.... but it should look in the browser as www.yyy.com/...
Is there any way to do this using php?
I dont think there is an easy way. If you are using Apache you can write a .htaccess with some rewrite rule in it to to a transparent redirect.