I am using Dyndns service for my PC. This allows me to get my PC's current Wan IPAddr from my ISP.
say I can use below WinForm app code to get the IPAddr by passing in this hostname example : Marina.dyndns.biz
public static void DoGetHostEntry(string hostname)
{
IPHostEntry host;
host = Dns.GetHostEntry(hostname);
Console.WriteLine("GetHostEntry({0}) returns:", hostname);
foreach (IPAddress ip in host.AddressList)
{
Console.WriteLine(" {0}", ip);
}
}
My PC link to a router which uses local ISP service.
Q1. Is this returned Wan IPaddr refered to my Router's External IPAddr ?
Q2. What if I have fixed an IPAddr for the PC say 192.168.1.90? then what is the returned IPAddr refered to?
Q3. How do I do in Windows Phone 7.1 Mango version to get my PC's IPAddr with above code?
Thanks
A while back I used a similar service however it installed itself as a service and used to monitor the network for changes. The way it should work is by making calls to its server and checking the ip request is coming from.
The router itself has the WAN and internally uses LAN IPs to then do a NAT for comms over WAN.
The WAP IP is the external router IP that is given out by the ISP
When you do a Dns.GetHostEntry(hostname) you will get 192.168.1.90 which is the LAN IP of you PC.. not the WAN IP.. WAN ip is accessible to Dyndns but not to our code / OS itself directly.
You can't access / scan for IP address for other devices from #WP&
Related
Say I have a list of proxies - I pull out of one of these proxies. It's nothing but ip and port. From a programming level, you need to know the protocol to use such as socks5, socks5h, http, https... etc etc. Is there a way to retrieve what kind of protocol a proxy uses from the information given?
If you are using Node.js you can try check-proxy library, though it does much more than just checking protocol.
Your proxy server identify the port number for example 6080,9180,etc so you can easily identify the proxy server.
Your id address also private or public you can use 'proxy server ip address' that automatically create a virtual proxy network.
Example: Your private ip address is 172.16.10.158 you can use proxy server, your ip address will be 136.56.89.210. You can use public ip ex 125.124.85.69 change in to 179.68.36.49.
They say that IP addresses between the range 10.0.0.0 up to 10.255.255.255 can be used in private networks.
My work’s network has about 200 computers connected to each other using plain switch. At my office I own 2 computers which are connected to the network. The following configuration is true.
My PC1
IP: 10.10.20.113
Windows XP
Firewalls Off
No Proxy
Accessing PC2 from Firefox Browser using http://10.10.20.20 (It Works)
My PC2 (server PC)
IP:10.10.20.20
Windows XP, Apache Server
Firewalls Off
No Proxy
Server on this PC spits its homepage through the network at http://10.10.20.20
My private/local server above (PC2 with IP: 10.10.20.20) can be accessed only by Computers with IPs between the range 10.10.20.0 up to 10.10.20.255. A computer on the network that has an IP e.g. 10.10.30.30 throws a time out error. If I change Server's IP to 10.10.30.30 it works on networked computers in the IP range 10.10.30.XX but not on networked computers in the IP range 10.10.20.XX
How can I make my private server be accessed on any computer at the same private network with any IP addresses between the whole private range from 10.0.0.0 up to 10.255.255.255 ? Why god makes life difficult?
Thank U in advance !
It appears that your network has a mask length of /24. That means that the mask is 255.255.255.0. To access a network outside your network, you need a router. You wrote that you only have a switch so you need to add a router to route between networks.
Devices in the network 10.10.20.0/24 can only connect to devices in the 10.10.20.1 to 10.10.20.254 range. The 10.10.30.0/24 network has a range of hosts from 10.10.30.1 to 10.10.30.254. They are two different networks, and you need a router to route between those networks.
I have a REST service running on Mac OS X, which im currently accessing using "localhost:8888" and "10.0.2.2:8888"
I want to access the same service from another computer which is in the same network.
I disabled the firewall also and I typed
nc -v 192.168.1.3 8888
and got the result as
nc: connectx to 192.168.1.3 port 8888 (tcp) failed: Connection refused
currently i use localhost (to access using java application) and 10.0.2.2 (to access using android application runs in the simulator) which both runs on the same machine which the server runs too.
I want to put the android application to my phone and give the machine ip addess ( because if i connect to internet via wifi, it'll be in the same local area network) i should be able to access my service runs on my machine.
can some one please tell me what im doing wrong here? Thank you
You can't access localhost from your front end code. It needs to refer to the server's name or address.
The localhost address should be 127.0.0.1, which is in the loopback range of addresses. Any address in the 127.0.0.0/8 block can never appear anywhere on any network, nor can any address in that block be used as a source or destination address outside a host. It is not possible for one host to access anything in that address range on another host.
The goes back at least as far as RFC 990, ASSIGNED NUMBERS:
The class A network number 127 is assigned the "loopback" function,
that is, a datagram sent by a higher level protocol to a network 127
address should loop back inside the host. No datagram "sent" to a
network 127 address should ever appear on any network anywhere.
RFC 1122, Requirements for Internet Hosts -- Communication Layers:
(g) { 127, }
Internal host loopback address. Addresses of this form MUST NOT
appear outside a host.
Also RFC 3330, Special-Use IPv4 Addresses:
127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an
address anywhere within this block should loop back inside the host.
This is ordinarily implemented using only 127.0.0.1/32 for loopback,
but no addresses within this block should ever appear on any network
anywhere [RFC1700, page 5].
I'm interested in differentiating connections coming from the same PC.
socket.request.connection.remoteAddress; works perfectly for me on 1.0.4 to give me the public IP, but it will run into trouble when people are behind routers
For public ip - Get the client's IP address in socket.io
You have to use a combination of remote IP and remote Port to differentiate connections. If multiple connections come from behind the same router, your server would see them having the same public IP from the router, but they would be using different ports.
I am developing an P2P application where a peers talk to the server to inform its Private and Public IP. The application uses UDP for communication.
To get the private IP the client uses gethostbyname and bind it to that IP. The problem is when the system has more than one NIC. The problem is when one of the NIC is not connected to internet. So to avoid it i am using INADDR_ANY and bind it.
Now i need to get my local IP address to inform to the server. Is there any API which will tell me which IP address of the NIC is active?
You need to bind to an explicit IP address rather than INADDR_ANY as binding to INADDR_ANY will mean that calling getsockname() on the socket to get the local address will simply return INADDR_ANY.
So, what you need to do is iterate the available endpoints (using getaddrinfo()) and create a socket on each. These will then give you the correct address if you call getsockname() on them later.