Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 649

Answer by Kamil Maciorowski for What is the 127.0.0.2 IP address for?

$
0
0

Not a comprehensive general answer (there's one already). This answer of mine shows an example where 127.0.0.2 was used to solve the problem.

Extract:

The OP there attempted to test some software in a case when its connection to a server was rejected. This was done on the server by a temporary iptables rule that rejects all traffic from the client IP. The client was immediately able to "see" the connection was rejected.

The problem appeared when this person moved the server software to the same machine as the client and tried to use the loopback interface. The rule was set to block communication from 127.0.0.1 but the information a connection was rejected underwent the same rule and never got to the client software which hanged (presumably till timeout).

The solution was to use 127.0.0.2 as the server address and set a rule that rejects connections to it. The information about a rejection went to 127.0.0.1 and was able to pass to the client software.


Viewing all articles
Browse latest Browse all 649

Trending Articles