I have a magento2 web application which I need to enable maintenance mode excluding a specific IP. The following command did enable the maintenance mode without excluding my IP.
php bin/magento maintenance:enable --ip=220.127.116.11
and I tried the following since the above command didn't work.
php bin/magento maintenance:allow-ips 18.104.22.168
var/.maintenance.ip does exist and it has my ip listed in it.