<div style="__styleDocument: [object]">Hi there,</div>
<div style="__styleDocument: [object]">&nbsp;</div>
<div style="__styleDocument: [object]">It turns out that&nbsp;the port isn't being faked either.</div>
<div style="__styleDocument: [object]">&nbsp;</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.&nbsp; </div>
<div style="__styleDocument: [object]">&nbsp;</div>
<div style="__styleDocument: [object]">A tcpdump&nbsp;at the client&nbsp;shows that the IP headers&nbsp;aren't being modified.&nbsp; It's as if&nbsp;tproxy is&nbsp;creating entries in the hash table (TPROXY_ASSIGN and the subsequent call to setsockopt() is successful),&nbsp;but isn't overwriting the approriate fields in the IP headers.
</div>
<div style="__styleDocument: [object]">&nbsp;</div>
<div style="__styleDocument: [object]">Any thoughts?</div>
<div style="__styleDocument: [object]">&nbsp;</div>
<div style="__styleDocument: [object]">N</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">Nguyen Nguyen</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:n3nguyen@gmail.com" target="_blank">n3nguyen@gmail.com</a>
 &gt; 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>&nbsp;</div>
<div>Here's my problem:&nbsp; </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&nbsp;<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&nbsp;a web server.&nbsp; I get a connect timeout.&nbsp; </div>
<div>&nbsp;</div>
<div>At the webserver, when I do a tcpdump,&nbsp;it seems that only the port is being faked, not the IP address.&nbsp; That is,&nbsp;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.&nbsp; </div>
<div>&nbsp;</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,&nbsp;it works.&nbsp; Has anyone experienced this problem?&nbsp; What am I missing?&nbsp; </div>

<div>&nbsp;</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>&nbsp;</div>
<div>Many thanks,</div></div>
<div style="DIRECTION: ltr"><span>
<div>N</div></span></div>
<div style="DIRECTION: ltr"><span>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">Jan Engelhardt</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jengelh@linux01.gwdg.de" target="_blank">jengelh@linux01.gwdg.de 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>&gt;Q:&nbsp;&nbsp;Is patching the iptables userspace necessary if I just want to fool<br>&gt;around with the example programs, say foreign-tcp-connect? 
<br>&gt;<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>