lkml.org 
[lkml]   [2010]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: SNATed connections show as original ip in /proc/net/tcp
Date
From
On Sun, 11 Jul 2010 10:30:25 -0400, Alexander Clouter <alex@digriz.org.uk>  
wrote:

> Noah McNallie <n0ah@n0ah.org> wrote:
>>
>> just as the topic describes.
>>
> Probably better to post this to netdev?
>
>> I'm currently doing SNAT to force some destination tcp ports to be
>> routed
>> through a specific route rather than the default route. To accomplish
>> this
>> I mark thoes packets with iptables, use 'ip' to specify marked packets
>> via
>> the specified route, and then use iptables to change their source
>> address.
>>
> SNAT'ing locally sourced traffic? That's pretty nasty.
>
> Look into using 'ip rule' and a second routing table.
>
> http://lartc.org/howto/lartc.rpdb.html
>
> You will still need use iptables/MARK to do L4 (tcp/udp/etc) policy
> routing though, however now you can dump the ugly SNATing.
>
> Cheers
>

ok i'll stick it there i must have missed that browsing mailing lists last
night... uhh as far as ip rule i am using that, that's how i match the
packets with the firewall mark that need to go out a specific interface
and to a specific route... i don't believe ip rule has any option to match
packets based on destination port and change their source address and
route them out any specific interface, or i'd be doing that all along as
that would be much better.

noah


\
 
 \ /
  Last update: 2010-07-11 17:15    [W:0.052 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site