---
name: "IP_TRANSPARENT"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/IP_TRANSPARENT"
---

# IP\_TRANSPARENT(2const)

transparent proxying

## 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)](/IPPROTO_IP/2const.md). See [**setsockopt**(2)](/setsockopt/2.md). See [**ip**(7)](/ip/7.md).

## STANDARDS

Linux.

## HISTORY

Linux 2.6.24.

## SEE ALSO

[**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md), [**setsockopt**(2)](/setsockopt/2.md), [**ip**(7)](/ip/7.md)
