<div style="__styleDocument: [object]">Hi there,</div>
<div style="__styleDocument: [object]"> </div>
<div style="__styleDocument: [object]">It turns out that the port isn't being faked either.</div>
<div style="__styleDocument: [object]"> </div>
<div style="__styleDocument: [object]">I'm only able to connect if I set the foreign IP address equal to the local IP address and the foreign port equal to the local port. </div>
<div style="__styleDocument: [object]"> </div>
<div style="__styleDocument: [object]">A tcpdump at the client shows that the IP headers aren't being modified. It's as if tproxy is creating entries in the hash table (TPROXY_ASSIGN and the subsequent call to setsockopt() is successful), but isn't overwriting the approriate fields in the IP headers.
</div>
<div style="__styleDocument: [object]"> </div>
<div style="__styleDocument: [object]">Any thoughts?</div>
<div style="__styleDocument: [object]"> </div>
<div style="__styleDocument: [object]">N</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">Nguyen Nguyen</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:n3nguyen@gmail.com" target="_blank">n3nguyen@gmail.com</a>
> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr">
<div>Thanks for the response.</div>
<div> </div>
<div>Here's my problem: </div>
<div>I'm running foreign-tcp-connect on a machine (say <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://1.2.3.4/" target="_blank">1.2.3.4</a>) to fake a source address (say <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://5.6.7.8/" target="_blank">
5.6.7.8</a> port 9999) when connecting to a web server. I get a connect timeout. </div>
<div> </div>
<div>At the webserver, when I do a tcpdump, it seems that only the port is being faked, not the IP address. That is, the tcpdump output shows that I'm trying to connect from <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://1.2.3.4/" target="_blank">
1.2.3.4</a> port 9999. </div>
<div> </div>
<div>If I use <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://5.6.7.8/" target="_blank">5.6.7.8</a> as the fake IP address, it works. Has anyone experienced this problem? What am I missing? </div>
<div> </div>
<div>My setup:</div>
<div>Linux kernel <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://2.6.15.3/" target="_blank">2.6.15.3</a> (pristine) patched with tproxy-2.6.15-2.0.4</div>
<div> </div>
<div>Many thanks,</div></div>
<div style="DIRECTION: ltr"><span>
<div>N</div></span></div>
<div style="DIRECTION: ltr"><span>
<div><br><br> </div>
<div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">Jan Engelhardt</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jengelh@linux01.gwdg.de" target="_blank">jengelh@linux01.gwdg.de
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>>Q: Is patching the iptables userspace necessary if I just want to fool<br>>around with the example programs, say foreign-tcp-connect?
<br>><br>No, only if you want to modify the kernel ip tables.<br>(Which is not required if you only want to fake addresses.)<br><br><br>Jan Engelhardt<br>--<br></blockquote></div><br></span></div></blockquote></div><br>