Network TCP - Address binding

1 - About

binding is the fact to choose on which IP address(es) a process is listening (responding) to request.

3 - Example

3.1 - Local

If the process is bound only to the loopback ip 127.0.0.1, only clients running on the same machine would be able to connect to the server

3.2 - External

If the process is bound only to a external address, only clients coming through this IP would be able to connect to the server

3.3 - All

If the process is bound to the wildcard address 0.0.0.0, all clients would be able to connect to the server

4 - Subnet

bind a whole subnet to your Linux machine with AnyIP.

AnyIP is the capability to receive packets and establish incoming connections on IPs we have not explicitly configured on the machine.

An example use case is to configure a machine to accept all incoming traffic on eth0, and leave the policy of whether traffic for a given IP should be delivered to the machine up to the load balancer.

Ref:

5 - Management

5.1 - See

To see on which ip is bound a process, use the netstat command and check the local address. The local address is binding address.


sudo netstat -nltp


Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      23305/master
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      28220/opendkim
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      16849/nginx: worker
tcp        0      0 127.0.0.1:8125          0.0.0.0:*               LISTEN      2867/netdata
tcp        0      0 0.0.0.0:19999           0.0.0.0:*               LISTEN      2867/netdata
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      6957/php-fpm: pool
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      16849/nginx: worker
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      1386/java
tcp        0      0 127.0.0.1:41204         0.0.0.0:*               LISTEN      1386/java
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      22118/sshd
tcp6       0      0 :::25                   :::*                    LISTEN      23305/master
tcp6       0      0 :::3001                 :::*                    LISTEN      890/gogs
tcp6       0      0 :::443                  :::*                    LISTEN      16849/nginx: worker
tcp6       0      0 :::19999                :::*                    LISTEN      2867/netdata
tcp6       0      0 :::9100                 :::*                    LISTEN      12988/node_exporter
tcp6       0      0 :::8083                 :::*                    LISTEN      23455/java
tcp6       0      0 :::22                   :::*                    LISTEN      22118/sshd


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap