Reputation: 109
I have an IPN for Paypal. I have a simple NodeJS server using the express framework. I have a simple post wrapper for the handler url of the PayPal IPN.
I have a simple check for IP address to check if the POST request came from PayPal.
My problem is that if someone spoofs the IP Address and sends POST Requests to the IPN Handler, they can effect my back-end system as the IPN handler has functions that are determined from the POST data.
How can I make this more secure?
Thanks.
Upvotes: 1
Views: 151
Reputation: 30359
Upvotes: 0
Reputation: 1337
Preventing IP spoofing isn't something you can do server side. What you could do potentially is implement mechanisms to asses whether or not an IP is valid and see where it potentially comes from. Afterwards you could limit the IP's themselves to whatever is acceptable for you solution.
The spoofing part is client-side, meaning that if the client uses a Proxy for example he could spoof the IP through that and you wouldn't be able to tell straight away.
Check out this short article for a bit of general idea (https://www.kaspersky.com/resource-center/threats/ip-spoofing)
Upvotes: 1