Skip to contentSkip to conversation

question about TPROXY, --on-port and the fact it doesn't alter the packet header in any way

DISCUSSION SamLT 2 participants 2 messages Jul 13, 2012 – Jul 20, 2012

lore
Share & tools
lore

SamLT

author
#0 lore raw

Hello,

I've been playing with TPROXY with squid3, and it's working fine so far, but there is one thing (at least!) i do not understand:

if I use it with, e.g., --on-port 3129, for packet matching 'tcp dport 80', it then ends up in the INPUT chain, but still on tcp dport 80 (*)

squid3 is listening on tcp port 3129, so how does it get there?

Thanks in advance!

sam

(*) -> paquet header ot modified, and this is confirmed with the TRACE 'jump'

#1 lore raw
Quoted 7 lines · SamLT

I've been playing with TPROXY with squid3, and it's working fine so far, but there is one thing (at least!) i do not understand:

if I use it with, e.g., --on-port 3129, for packet matching 'tcp dport 80', it then ends up in the INPUT chain, but still on tcp dport 80 (*)

squid3 is listening on tcp port 3129, so how does it get there?

tproxy does the socket lookup and assigns it to the skb before the normal TCP code would.