Finding packet destination
Finding packet destination
Finding packet destination
Finding packet destination
Finding packet destination
Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination
Finding packet destination Finding packet destination
Finding packet destination
Go Back  Xtreme Visual Basic Talk > > > Finding packet destination


Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2010, 12:57 PM
abhilash abhilash is offline
Newcomer
 
Join Date: Jun 2010
Posts: 3
Exclamation Finding packet destination


Hey, I searched a lot but I couldnt find anything that could help me. I am making a software in VB .NET and I wanted to find out where a packet is directed i.e whats its destination IP . Actually what I am doing is kind of a relay.. means for example - A computer(192.168.1.2) wants to send a data to 192.168.1.10:80 but I make it send the data to my server computer i.e 192.168.1.5 which then sends the data to the destination machine which 192.168.1.10:80 . So basically I want to find out where the packet wants to reach(in this case 192.168.1.10:80) . The structure looks like --
Client Computer -> Destination Computer [ In normal case ]
But I want to do something like this :-
Client Computer -> Server Computer -> Destination computer
For the Server computer to send the data to destination computer I guess I will have to know where the packet wants to reach or something.. So , Please help me out .. I learnt Visual Basic by referring to this website.. So , I have come for help here

If there is any alternative method or some sample codes pls give
Reply With Quote
  #2  
Old 06-16-2010, 08:32 PM
PlausiblyDamp's Avatar
PlausiblyDampFinding packet destination PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Out of curiosity I feel the urge to ask why?

What type of connection is being made between the client and the destination computer and is the server going to be doing anything other than just blindly passing the packets to this destination?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 06-16-2010, 08:40 PM
abhilash abhilash is offline
Newcomer
 
Join Date: Jun 2010
Posts: 3
Default

ok , let me explain it to u. What I want to do is have my LAN Computer use my Server computer's ports(Connected to the Internet) . Basically I want the LAN computer to access the Internet through a specific port without using Internet Connection Sharing. Means if I have setup the server to listed on Port 80 then the LAN Computer can access the Internet only through Port 80 .
Reply With Quote
  #4  
Old 06-16-2010, 09:01 PM
PlausiblyDamp's Avatar
PlausiblyDampFinding packet destination PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

It sounds as though you want to write your own firewall / NAT solution in VB - is that the case?

Is there any reason why you can't / don't want to use an existing solution like Internet Connection Sharing for this? Developing this kind of application is certainly going to be non-trivial. It isn't just a matter of listening to inbound requests on port 80 (to use your example) and then forwarding them on; you will also need handle any responses from the destination and forward them to the client as well. Also connections are established on a well known port (e.g. 80 for http traffic) but as part of TCP this connection will then negotiate a different port for the actual connection - this means you will now also need to take this into account.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 06-16-2010, 09:19 PM
abhilash abhilash is offline
Newcomer
 
Join Date: Jun 2010
Posts: 3
Default

Well , I knw how to send the Data Back to the Computer which requested to connect to internet. I just wanna know the other side i.e how to get the data reach the destination computer. And its not Firewall :P Pls help me out bro
Reply With Quote
  #6  
Old 06-17-2010, 06:07 AM
PlausiblyDamp's Avatar
PlausiblyDampFinding packet destination PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

In all honesty I haven't personally got the expertise in this area to do what you are asking, I do know enough however to realise how complicated this is.

What code have you got currently though? If you already have the code in place to listen and respond it might not be too big a leap to implement the rest.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
Reply

Tags
packet vb.net destination


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Finding packet destination
Finding packet destination
Finding packet destination Finding packet destination
Finding packet destination
Finding packet destination
Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination Finding packet destination
Finding packet destination
Finding packet destination
 
Finding packet destination
Finding packet destination
 
-->