I need help for following use case:
I have one server listening on port 2000. And I want to do "something" so that when someone tries to reach to my server on port 3000, he'll succeed.
That "something" should redirect all traffic between client and my server from port 3000 to port 2000.
1. My server listening on port 2000
2. client tries to connect to my server and port 3000
3. TCP SYN comes to my server's ethernet driver
4. A filter modifies destination port from 3000 to 2000 while that packet goes from ethernet to application layer (probably WinSock).
5. In same way TCP SYN,ACK packet goes back to client.
6. Same thing happens for all other packets on that connection.
7. Hence though my server is listening on port 2000 and client thinks that he is communication tos erver on port 3000, it works without problem.
I tried to do this with Firewall Hook driver but I wasn't able to do what i wanted to. NDIS Intermediate Driver can do something like this it seems but i dont know anything about that. Can someone pls guide me about this ?
Is there any sample for such thing ? (remember that i dont just want a capability to allow/block packet. What I want is capability to midify TCP/IP packet. Something on the line of iptables in linux or NAT)