mfc >> Change IP address of packets

by mahajan.vibhor » Wed, 22 Mar 2006 18:48:06 GMT

Hello All,

Can I change the IP Address of packets going to network from my
machine. On my machine i am running a number of virtual machines and
want to send data with IP Address of virtual machine, but Wndows socket
is connected to NIC card and socket place IP address os phyisical
machine, i want to replce this IP Address to virtual machine IP
address.

I am using WinXP.

Thanks in advance..

Vibhor Mahajan



mfc >> Change IP address of packets

by Adeel » Wed, 22 Mar 2006 20:50:22 GMT


Hi Vibhor,

I don't think what you're saying is possible. If it were, it would
probably enable all sorts of spoofing attacks and whatnot.

Another thing, at application layer, you don't have any control over
what address you're assigned or how your packet actually travels over
the network.

Perhaps you can send the virtual machine's information inside your
data to notify the receiver about it.


hope this helps
cheers
Adeel









mfc >> Change IP address of packets

by Carsten Schaudel » Wed, 22 Mar 2006 21:25:32 GMT

Well,

I would think changing the IP-addresses of a packet is a very normal thing -
well known as 'masquerading'.

But I also can't tell you how to realise what you want to do ...



"Adeel" <dontWantSpam@All> schrieb im Newsbeitrag







Change IP address of packets

by Adeel » Wed, 22 Mar 2006 22:17:58 GMT

Yeah, I agree with you, Carsten. Perhaps what I failed to emphasize
was that you can't do it at the application layer level (through the
sockets).

But still, I wouldn't call it 'normal'...

If it were 'that' easy we would have a huge number of masqueraders...
because there're arguably larger number of socket programmers than
there're device driver programmers.












Similar Threads

1. Can you use Winpcap to get IP address of a packet

Using winpcap I have actually got the adapter,time stamp,header
length..etc.Is it possible to get the IP address as well.What other
functionality can you induce using Winpcap.I am using VC++ to do my project.
thanks in advance
love
JEEVAN
 XXXX@XXXXX.COM 


2. DWORD IP Address to Displayable IP Address

3. convert the ip packet to and from RS-232 packet

Hi, I need to use radio to connect two local ip network, each local
network has a server computer which connects to a radio with RS-232
interface.  I need to write a program to convert the ip packet into
RS-232 packet, so the radio can send packetes to the remote radio. I
don't want to reinvent the wheel, is there anyone could give me some
suggestions?
Thank you!
Han

4. Changing IP address - CSharp / C#

5. WMI event on IP address changed

Hi all,

I want to be notified using WMI when IP address is being changed.
The following code is good for disable/enable device:
WqlEventQuery query = new WqlEventQuery("SELECT * FROM
__InstanceModificationEvent WITHIN 2 WHERE TargetInstance ISA
\"Win32_NetworkAdapter\"");
//WqlEventQuery query = new WqlEventQuery("SELECT * FROM
__InstanceModificationEvent WITHIN 2 WHERE TargetInstance ISA
\"Win32_NetworkAdapterConfiguration\"");

// Initialize an event watcher and subscribe to events that match this
query
ManagementEventWatcher watcher = new ManagementEventWatcher();
watcher.Query = query;
while (true)
{
    ManagementBaseObject e = watcher.WaitForNextEvent();
    Console.WriteLine("Description:\t\t {0} ",
((ManagementBaseObject)e["TargetInstance"])["Description"]);
    Console.WriteLine("ConfigManagerErrorCode:\t {0} ",
((ManagementBaseObject)e["TargetInstance"])
["ConfigManagerErrorCode"]);
    Console.WriteLine("NetConnectionStatus:\t {0} ",
((ManagementBaseObject)e["TargetInstance"])["NetConnectionStatus"]);
}
//Cancel the subscription
watcher.Stop();
for IP addresss I should use class
"Win32_NetworkAdapterConfiguration". any idea how to do it?
One more thing. When state is changed to disabled\enabled, I only get
Disconnected/Connected
Device is working properly/Device is disabled
Any idea why I don't get also: Connecting/Disconnecting/Authenticating
status

thanks.

6. Getting notified of IP address change? - CSharp/C#

7. How to change localhost IP address in the program


8. Dynamically change IP Address - CSharp/C#