Re: Transparent proxying using REDIRECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikko Alutoin wrote:
How does the proxy get to know the original destination IP address and port? By looking into the HTTP-request, perhaps? If so, what if the application protocol (some other than HTTP) does not contain the destination URL?

Use SO_ORIGINAL_DST, for example:


getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &dst_addr, &addrlen);

--
Philip Craig - philipc@xxxxxxxxxxxx - http://www.SnapGear.com
SnapGear - Custom Embedded Solutions and Security Appliances



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux