How does Google Maps find out my location on my Desktop/Laptop ?
Google says it might use my IP or Wifi data to determine my location.
But how can a Browser read my Wifi data ? Is it really possible ? Can it read my Router's MAC ID ? Signal Strength ? How ? how ? how ?
It's not reading the wifi data like that from your computer. What they mean is that your wifi provider (if you're using a public provider) may provide data on the location associated with someone connected to a given IP address.
It matches your IP address, not your router IP, but your cable modem address to a list of registered IPs. This published IP mapping has a physical address, and then geocodes your address.
Related
I am owning a Windows PC. I have written a Web application that runs fine. But the problem is my PC's IP changes periodically. I want that application to be accessible in the network (from other pc's) without changing client side code . My client side code is in angular js.
The web server of your web application cannot bind to the correct IP if it doesn't know it in advance.
You can make your IP address static by following these steps:
In Windows, go to the Network and Sharing center
In the left pane, choose "Change adapter settings"
Right click your ethernet or wifi connection (the one connected to your router) and choose Properties
Double click Internet Protocol Version 4 (TCP / IPv4)
As an IP address, choose the one your computer already has (or try another IP address starting with the first same 3 numbers, i.e. xxx.xxx.xxx.yyy)
The default gateway is the IP address of your router
The subnet mask is typically 255.255.255.0
For the DNS server choose Google's 8.8.8.8 and/or your router's IP address
You have several choices depending upon your configuration.
If this is the public dynamic IP you get from your ISP, you can go to your ISP (whoever you get internet service from) and upgrade your service to a static IP address so it won't change.
If this is the public dynamic IP you get from your ISP, you can use a dynamic DNS service to attach a hostname to your IP address and then use that hostname to access the server. The dynamic DDNS app you put on your server will keep the DNS updated whenever your dynamic IP address changes.
If this is just a local IP address on your LAN (a 192.x.x.x or 10.x.x.x address), then you can pick an IP address that your router supports, but is above the range being used for DHCP and set that computer to use that IP address and not DHCP. In Windows, you can go to the networking configuration and choose the IP address instead of using DHCP. Then, the IP address won't ever change. It is important that you pick an address outside the range used for DHCP to avoid any conflicts. On my own LAN where the router is allocating addresses like 192.168.0.x, I manually assign addresses like 192.168.1.250.
This is something that your router handles through a protocol known as DHCP. Basically, the answer is to keep your IP from changing.
Many routers allow you to reserve an IP for certain MAC addresses. I would recommend that you access your router over your local network and work with the GUI it provides to try to configure this... if you're successful, then your IP will no longer change, and problem solved :-) If it's not intuitive, then of course refer to the documentation for your router.
I configured IIS in my windows 7, and when I enter 'http://localhost' in address bar; I can see my web site. Now, when I want to see my web site by entering internet IP address in address bar, I connect to the ADSL modem (it opens the page which we use to configure the modem!).
It seems that because the modem connects to the internet an gets the IP, not the PC, so the internet IP connects me to the modem. So, I think, I must change some settings of my modem.
I use a D-Link modem.
How can I fix that?
Thanks in advance
Unless you have a "server" or "business" configuration from your ISP which provides you a full subnet of public IP addresses, you've been allocated a single external IP address and the router attached to it does Network Address Translation for all the devices connected behind it. You can confirm this by using ipconfig or Windows Settings (ifconfig on Unix-like machines) to get your IP address. If using NAT, it will start with "10.", "172.16." through "172.31.", or "192.168.". These are "private" addresses and cannot be reached through the public internet.
For someone on the public internet to reach your computer, you need to set up Port Forwarding that redirects incoming traffic on your public, external IP to that port to a machine on the private network. The configuration pages for your router will have this configuration somewhere.
Note that if your router's configuration page is running on port #80 and you really want outside viewers to connect to you without giving an explicit port number, you will probably need to turn off or restrict modem configuration, move it to a another port, or go SSL only (port 443) so as to not cause a conflict with the port you're forwarding.
D-Link is a very common brand of router and there are pages dedicated to configuring port forwarding on them.
Also, just to complicate things, you almost certainly haven't been given a Static IP Address (they are usually quite expensive) which means that your external IP address will change from time to time (perhaps yearly, perhaps daily) making it difficult to tell others how to connect to your page. Your router configuration likely has support for Dynamic DNS (some free, some paid) where the router automatically updates the DNS entry whenever your public IP address changes.
Background:
I'm trying to communicate with an IP camera without the need of a DHCP server. This is how the camera acquires an IP address:
Basic DHCP procedure (discover etc.)
If above should fail the camera has a fallback address of 192.168.0.90
The camera then starts the avahi-daemon and successfully gets a link-local address too for robustness
The IP aliasing is now done and the interface has two IPs.
Problem:
Now the problem is that when I avahi-browse to browse the services on the network, the camera replies with both IP addresses (checked with Wireshark).
Only one is shown by avahi and it could be the zeroconf:ed address or the fallback address.
I want the link local address only, not the fallback. Any reliable way to get it?
Old question but just in case someone else has the same problem:
Avahi will only return one of the IP addresses reported by the device. This seems to be a (debatable) design decision and is explained in this post of the avahi mailing list. So I'm afraid there's no reliable way to get only the link-local address, if you are using avahi-browse.
On a side note, RFC3927 section 1.9 specifically recommends NOT to configure both a routable address and a link-local address simultaneously for the same interface. But I do understand this is the camera's behaviour and probably outside your control.
Thank you in advance for someone who answers this question. I used javascript to find out the ip address in my computer, the code is as following
function getip(json){
alert(json.ip); // alerts the ip address
}
I get one ip address which say 123.32.11.1
However when check my ip address on my mac it says I am connecting to xxx and the ip address is 10.1.223.123
I am confused about what's the two different ip address means.
If I am trying to use ip address to identify my geolocation I will need to use the first one. Does that mean only the first ip address means where I am located?
Thank you in advance.
Your IP address is probably 123.32.11.1. Any address in the range 10.x.x.x is a private IP address; sometimes used by your computer for internal business (see here).
Another option is that you have 2 IP addresses by virtue of being connected on 2 separate networks.
I am using socket programming to connect two PCs in java through wi-fi. I used the ip address of the server at the client side. but the problem is that when the ip address of the server got changed then i have to change the ip address of server at client side. and when i use host name for connection nothing happens. is there any way to use static ip or any other solutions that can work to connect both of them which can work on any network. independent of ip address of the server.
please suggest me the solution.
i think there is a simple solution to your problem ...
you should get the ip address of your device by using Inetaddress.getbyName("user-pc").getHostAddress()
hope it will work for u...
1. First of all If you are on LAN, then Any IP from Class A, B, C will suffice, But if you want it over the Internet, then you will have to be careful about the Private and Public IPs.
2. For static IP over internet you need to contact you Internet Server Provider, or you can try out some sites over the net that provides static ip based on your dynamic ips.
3. But if you want that due to the change in your server ip the client code need NOT be changed then you can do the following...
- Use the Domain Name of the Server instead of IP, by using Domain Name Server.
- Instead of storing the raw IP of the Server in the Client code, use Some variable which gets the IP of the server from some file like the Property file, Database etc...