Hi all! Question reguarding how ipnat matches source addresses/ports. Gonna try to get strait to the point here. I want to have ipnat rewrite the source address/port of outgoing traffic by matching the orgin source address AND port. Here is the steps I have done on a Linux 2.6 system with Netfilter:
1. Service binds to whatever port with intention of connecting to machine X. 2. Service instructs netfilter to rewrite any packets from the binding in step one to look like they come from machine Y. 3. Service issues a connect to machine X. 4. Machine X gets the connection from what looks like machine Y. 5. Connection is spoofed. I'm not trying to be malicious, but instead I want to allow machine X to apply its existing filtering rules on the connection. If I don't then it will see all traffic from my service's machine. My service in this case is handing the other side of the connection (i.e., a transparent proxy). Thanks for any info. I suppose I have some research to do if I want to write this myself, but it seems it would be rather straigth forward to simply add the port matching into ip_nat.c. Thanks, Jason
