Search code examples
pythonnetworkingscapyspoofing

Is it possible to send packets using spoofed public IP?


Is it possible to send a web packet using a spoofed public IP (Custom source IP header) to a server (Raspberry Pi), and have the Pi log the packet. The response is not important, nor is the method used(TCP, UDP, HTTP), only the initial one way communication.

I have searched around on the first and second pages of google, but all examples I could find demonstrate this on local a IP such as 10.0.2.12. Will these examples work if I use a destination such as 67.70.XX.XX?

I'm a newbie to python networking, any help at all, or links to other resources is greatly appreciated.

Thanks everyone for your time! :)


Solution

  • It's much harder to spoof your public IP that it seems. You'll need to replace your ISP-box with your own modem..

    @Number File's answer is pretty wrong. It's easy to spoof an IP on the local network (basically the src field of IP) but much harder on a public level.

    Have a look at https://superuser.com/a/619483