Peshawar is the capital of Pakistan 's North West Frontier Province and the gateway to the tribal areas bordering Afghanistan .