Sorry to say it, but the OP could have googled for half of the answer to this... but anyway...
As far as I am aware, a proxy doesn't exactly serve the same function as "IP Spoofing" but rather does make it a little harder to find the end clients' IP address.
Assuming you are talking about IPv4, and know a little bit about IPv4 structure for a datagram. (If not see Wikipedia for a diagram or look for the structure definition which I think is in the header file for winsock.h (Windows) or sys/socket.h (UNIX/Linux) in C/C++)
In Java there is no "native way" of modifying packet headers as the virtual machine is abstract of the implementation for the platform underneath.
However your answer lies in using raw sockets to change the "Source IP" and maybe even the MAC field(s) of the IP Header. You'll probably end up writing this in C / C++, which you could also write as a library which you could interface with Java (I am lead to believe).
Link that maybe useful: http://www.citi.umich.edu/u/provos/security/ipspoof.1
Posts: 960 Location: in front of a computer (duh) Joined: 05.04.07 Rank: Mad User
Posted on 21-12-10 03:01
I don't think Java would be a good language for this kind of applications, and since I'm a java nut (get it?) it's a bit of a bummer.
I once asked this kind of question at a different forum, although the application I had in mind was just to generate and ping the IP's generated by the application, and they informed me that since Java was designed to be hardware-independent , it's going to be hard to write an application that will work directly with your ethernet card, so unless you have a hardware library installed as well.
But since techb has already provided you with the answer, you might as well take a look at the code and see how it's done. I'd recommend you have some knowledge in network programming in Java, though.
Hellbound Hackers is the collective work of the staff and the community and is therefore licensed under the CC BY-NC-SA license.