we assume that the server has the IP addresses "111.111.111.111" and "222.222.222.222" (host ip) and I want to bind IRI to the ip 111.111.111.111
PORT = 14265
UDP_RECEIVER_PORT = 14600
TCP_RECEIVER_PORT = 15600
API_HOST = 111.111.111.111
but netstat -tulpen shows
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:15600 0.0.0.0:* LISTEN 1000 20735 662/java
tcp 0 0 111.111.111.111:14265 0.0.0.0:* LISTEN 1000 20757 662/java
udp 0 0 0.0.0.0:14600 0.0.0.0:* 1000 20729 662/java
which leads to the problem that my neighbors are trying to communicate with 222.222.222.222 which is the host (not IRI) ip.
***** NETWORK ALERT ***** TCP connection reset by neighbor 222.222.222.222, source closed, Connection reset
/etc/hosts
otherwise it is only used because of the order in the hosts.