473,665 Members | 2,827 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is local IP Addresses viewable to remote IP Address?

I have an issue where I have a remote IP Address, and I need to discover the
local network interface IP Address which is viewable to the remote IP Address
(for UPnP document purposes). For example, if I have the remote IP Address
10.0.0.4, and I know all of the local IP Addresses:

127.0.0.1
10.0.0.5
10.1.0.20
192.168.0.5
157.54.185.126

How can I determine which of these IP addresses, without connecting to the
remote machine, that if broadcast over that network interface, the remote
device could see the broadcast and also connect to the local machine at that
IP address. I was looking at some properties in the NetworkInterfac e class
and stuff, but nothing was obvious to me. I hope I am explaining the problem
well enough.

Thanks

Jun 27 '08 #1
1 2404
On Wed, 04 Jun 2008 18:59:02 -0700, Agendum
<Ag*****@discus sions.microsoft .comwrote:
[...]
How can I determine which of these IP addresses, without connecting to
the
remote machine, that if broadcast over that network interface, the remote
device could see the broadcast and also connect to the local machine at
that
IP address.
Well, given your remote IP address, you should be able to apply your local
subnet mask to the remote address and each of your local addresses, and if
they result is equal then those addresses are on the same subnet.

But, you really shouldn't need to do this. Just broadcast to
IPAddress.Any, and assuming the remote machine is reachable, it will
receive the broadcast and can use the origin IP address to determine how
to connect back. There should be no reason for your local process to know
or care what the configured IP address is.

Pete
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10178
by: miles111 | last post by:
Basically, can I execute a php script from within a php script? Heres some details: I'm using a remote script to get my local ip address using $HTTP_SERVER_VARS; This works. Now I want to run a local php script to call the remote script and return my ip address. Any Ideas? Thanks! -bp
4
27218
by: Arne | last post by:
Hi, Probably an easy answer to this, but I have not been able to figure it out. How can I find the IP-address of the machine that my Java-program is running on ? Could not find any methods in the InetAddress class that does this. The closest I got was the getLocalHost() which will return the IP-address representing the loopback address (usually 127.0.01, isn't it ?). Any ideas ?
0
1704
by: Michael Höhne | last post by:
Hi, we're developing some web services and use the local development server of Visual Studio 2005 to create, run and debug the project. The web service methods connect to a database hosted on a dedicated server and the Microsoft CRM 3.0 server, also on a separate machine. As the CRM server installation makes changes to the Active Directory, they are located in a separate domain, while the development machines are member of the companies...
6
3619
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
4
4918
by: Tom | last post by:
I come from C but don't really understand why in C++ you can return a temporary object from a function. For example: class Test { public: Test() { cout << "Address of object: " <<this <<endl; } ~Test() { } };
5
72347
by: Hooyoo | last post by:
Hi, here, How to get local machine name and IP address? Thanks.
2
3213
by: daz_oldham | last post by:
Hi everyone I'm trying to lock my SQL Server Desktop Edition down which is running on a relatively fresh install of Windows 2003 Server Standard Edition which is a dedicated server from Fasthosts. I'd like to create a local security policy that denies access to all remote addresses other than my fixed IP address at home and work. However, all attempts to create a policy just result in nothing
7
5932
by: RN1 | last post by:
Is it possible to connect to my local SQL Server 2005 database from a remote web server? If yes, what ConnectionString do I use? Thanks, Ron
1
3159
code green
by: code green | last post by:
I have had 3 seperate procedures running happily for a couple of years that I now wish to merge into one. 1. Collect list of email addresses from Access on local server. Write these addresses to a CSV file. 2. FTP the CSV file from local server to remote server using FTP program 3. Insert email addresses from CSV into MySql and send out an email. Number one and two I can merge into one PHP script (subscribers.php), but the third...
0
8438
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8779
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.