---
name: "IP_FREEBIND"
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_FREEBIND"
---

# IP\_FREEBIND(2const)

bind to a nonlocal or nonexistent IP address

## NAME

IP\_FREEBIND - bind to a nonlocal or nonexistent IP address

## 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\_FREEBIND,**                **const int \****enable***, sizeof(int));**

## DESCRIPTION

If enabled, this boolean option allows binding to an IP address that is nonlocal or does not (yet) exist.

This permits listening on a socket, without requiring the underlying network interface or the specified dynamic IP address to be up at the time that the application is trying to bind to it.

This option is the per-socket equivalent of the */proc/sys/net/ipv4/ip\_nonlocal\_bind* interface.

## 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.4.

## SEE ALSO

[**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md), [**setsockopt**(2)](/setsockopt/2.md), [**proc\_sys\_net\_ipv4**(5)](/proc_sys_net_ipv4/5.md), [**ip**(7)](/ip/7.md)
