IP_TRANSPARENT
transparent proxying
- Provided by: manpages-dev (Version: 6.17-1)
- Source: manpages
- Report a bug
transparent proxying
Standard C library (libc, -lc)
#include <netinet/in.h> /* Definition of IP* constants */ #include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_TRANSPARENT,
const int *enable, sizeof(int));
Setting this boolean option enables transparent proxying on this socket.
This socket option allows the calling application to bind to a nonlocal IP address and operate both as a client and a server with the foreign address as the local endpoint.
This requires that routing be set up in a way that packets going to the foreign address are routed through the TProxy box (i.e., the system hosting the application that employs the IP_TRANSPARENT socket option).
Enabling this socket option requires superuser privileges (the CAP_NET_ADMIN or CAP_NET_RAW capability).
TProxy redirection with the iptables TPROXY target also requires that this option be set on the redirected socket.
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).
Linux.
Linux 2.6.24.