| IP_TRANSPARENT(2const) | IP_TRANSPARENT(2const) |
NAME
IP_TRANSPARENT - transparent proxying
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#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));
DESCRIPTION
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.
ERRORS
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).
STANDARDS
Linux.
HISTORY
Linux 2.6.24.
SEE ALSO
IPPROTO_IP(2const), setsockopt(2), ip(7)
| 2025-11-25 | Linux man-pages 6.17 |