referring the correct local ip from template file