How do I check that a computer are a member of a sutain network????

Posted on 2001-06-27
Last Modified: 2010-04-17

I'm thinking of developing a peer 2 peer client. That should not be a problem. But its a p2p client who only should allow users working for my company. How do I see that the user are inside our LAN?

You probarbly know what I meen.

For points I'd like some code in java och C++ or something simular.

Peace. Mike
Question by:Micke_Cap
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Accepted Solution

DreamMaster earned 100 total points
ID: 6230524
If the users are inside your lan, you can probably check them using their IP numbers....if the IP number is in a certain range....they are in your lan...

LVL 22

Expert Comment

ID: 6230586
Indeed the IP address can be of use.

in java it would be something like using sockets.

ServerSocket server=new ServerSocket(1818);
Socket socket=server.accept();

The IP returned by getInetAddress should be checked against your LAN-ip numbers. Not for each and every one, just check for the boundaries in your domain.

LVL 22

Expert Comment

ID: 6230595
The code above would be java specific. Though the WinSock object provides the same functionality.
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.


Expert Comment

ID: 6231057
just set up your firewall to only allow those from your group, based on IP address.

if you fon't have a firewall, try Zone Alarm, it's the best.

Author Comment

ID: 6231202
It's true that I can use the IP adress when the user is inside our net but we have consultants that are outside out net aswell. Mayby I was'nt clear enough on that.

Ithink I have solved it by making a client based om my own protocol instead of gnutella. then I can make a client that has a built in crypted password.

Thank you guys for getting me on the right track...

LVL 22

Expert Comment

ID: 6231214
If you have solved the problem could you please select one of the comments above as the answer, or delete the question? That will keep the unanswered questions list short :-)


Expert Comment

ID: 6231301
If you want to scan for Lan, I'll support checking IP address. But as graham_k suggested...Zone Alarm is the best.It is free for "personal" use.

Are you using DHCP ?

For security you may try out servlets.

Have a look at:

and also some code on socket:

may be helpful.


Expert Comment

ID: 6231306
Sorry I was little late...

Expert Comment

ID: 6231315
servlets may be useful then...
LVL 27

Expert Comment

by:Asta Cu
ID: 6931871
Hopefully you've already been helped with this question, but thought you'd appreciate knowing this.  It would be great if you could bring this question to a conclusion, awarding the experts above who helped you with points or a comment to them on your status today.

WindowsUpdate has new updates for .NET users; Details follow - Microsoft .NET Framework
The .NET Framework is a new feature of Windows. Applications built using the .NET Framework are more reliable and secure. You need to install the .NET Framework only if you have software that requires it.

For more information about the .NET Framework, see (This site is in English.)

System Requirements
The .NET Framework can be installed on the following operating systems:
Windows 98
Windows 98 Second Edition (SE)
Windows Millennium Edition (Windows Me)
Windows NT 4.0® (Workstation or Server) with Service Pack 6.0a
Windows 2000 with the latest service pack installed (Professional, Server, Datacenter Server, or Advanced Server)
Windows XP (Home Edition and Professional)
You must be running Internet Explorer version 5.01 or later for all installations of the .NET Framework.

To install the .NET Framework, your computer must meet or exceed the following software and hardware requirements:

Software requirements for server operating systems:
MDAC 2.6
Hardware requirements:
For computers running only a .NET Framework application, Pentium 90 mHz CPU with 32 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
For server operating systems, Pentium 133 mHz CPU with 128 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
Recomended software:
MDAC 2.7 is recommended.
Recommended hardware: For computers running only a .NET Framework application, Pentium 90 MHz CPU with 96 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.
For server operating systems, Pentium 133 MHz CPU with 256 MB memory or the minimum CPU and RAM required by the operating system, whichever is higher.

How to use -> Restart your computer to complete the installation. No other action is required to run .NET Framework applications. If you are developing applications using the .NET Framework, you can use the command-line compilers or you can use a development environment, such as Visual Studio .NET, that supports using the .NET Framework.

How to uninstall
To uninstall the .NET Framework: Click Start, point to Settings, and then click Control Panel (In Windows XP, click Start and then click Control Panel.).
Click Add/Remove Programs.
Click Microsoft .NET Framework (English) v1.0.3705 and then click Change/Remove.
More here

The .NET topic is being considered for addition to our All Topics link soon, so this may interest you as well:

EXPERTS POINTS are waiting to be claimed here:


LVL 54

Expert Comment

ID: 7466856

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: DreamMaster (100) CJ_S (100) graham_k (100)
Please leave any comments here within the
next seven days.



Expert Comment

ID: 7505164
Finalized as proposed

graham_k your points are at:

CJ_S your points are at:


Community Support Moderator
Experts Exchange

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Simple Linear Regression
Introduction to Processes

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question