How to get access to NAT info from userland
I have a socket, IPv4. It is being transparent proxied to userland via a REDIRECT NAT target.
Is there any getsocketopt() or any syscall so I can get the REAL destination address off this socket from userland?
If not, I still need to know the TRUE DESTINATION when using a transparent proxy so I know where to send to request. What needs to added to the kernel (e.g. like an iptables TARGET) to get this info.
- Brian G
Quoted 5 lines · Sam Roberts
Quoted 3 lines · Brian G
If not, I still need to know the TRUE DESTINATION when using a transparent proxy so I know where to send to request. What needs to added to the kernel (e.g. like an iptables TARGET) to get this info.
Does the conntrack -L output have the info you'd like?
Probably. Too bad my distro (CentOS) doesn't seem to provide this binary.
Quoted 1 line
Sam
Brian
Quoted 7 lines · Brian G
Quoted 5 lines · Sam Roberts
Quoted 3 lines · Brian G
If not, I still need to know the TRUE DESTINATION when using a transparent proxy so I know where to send to request. What needs to added to the kernel (e.g. like an iptables TARGET) to get this info.
Does the conntrack -L output have the info you'd like?
Probably. Too bad my distro (CentOS) doesn't seem to provide this binary.
Ye, enterprise distributions have a bad track record for shipping the complete NF suite. Avoid :/
Quoted 7 lines · Jan Engelhardt
Quoted 4 lines · Brian G
Quoted 2 lines · Sam Roberts
On Sat, Apr 2, 2011 at 1:23 AM, Brian G<[email protected]> wrote:
Does the conntrack -L output have the info you'd like?Probably. Too bad my distro (CentOS) doesn't seem to provide this binary.
Ye, enterprise distributions have a bad track record for shipping the complete NF suite. Avoid :/
TPROXY will work, it should become commonplace by the time IPv6 gets going strong. Someone on stackoverflow answered my question, although he called tproxy a 'hack'. It will work fine so long as it doesn't hinder performance.
Brian G.
Quoted 5 lines · Brian G
Quoted 4 lines · Jan Engelhardt
Quoted 3 lines · Brian G
Quoted 2 lines · Sam Roberts
On Sat, Apr 2, 2011 at 1:23 AM, Brian G<[email protected]> wrote:
Does the conntrack -L output have the info you'd like?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Probably. Too bad my distro (CentOS) doesn't seem to provide this binary.
Ye, enterprise distributions have a bad track record for shipping the complete NF suite. Avoid :/
TPROXY will work, it should become commonplace by the time IPv6 gets going strong. Someone on stackoverflow answered my question, although he called tproxy a 'hack'. It will work fine so long as it doesn't hinder performance.
Hey, if TPROXY is a hack, so is the entire NAT business in itself! :)