The above mentioned issue has been resolved. Credit goes to Mithrandir @ Varnish IRC Channel. Thanks! Below mentioned changes were required to resolve the issue.
At the start of the default.vcl add :
import std;
Below " if (req.http.x-forwarded-for) " add :
std.collect(req.http.x-forwarded-for);
Do varnish configtest & reload. This should start showing the Public IP.
Below is the explanation from the documentation of vmod_std :
collect
Prototype collect(HEADER header) Return value Void Description Collapses the header, joining the headers into one. Example std.collect(req.http.cookie); This will collapse several Cookie: headers into one, long cookie header.