Can’t resolve public IP in NAT environment
February 8th, 2008 . by DaveScenario:
Public <-NAT-> Private
87.114.220.20 <-NAT-> 192.168.1.20
Problem: The NAT’ed machine can not resolve (or ping) its public address.
Solution: Add a loopback interface with the public IP address on it.
This is particular useful on web servers where viewing the site on the server itself is required for testing etc.
Windows heads: How to add loopback interface
Linux heads: You’ll have to create a new lo interface with the public address. lo:1 for example