Apache 2.4: IP Whitelisting
1...
2...
3 AuthType Basic
4 AuthName "Development Area"
5 AuthUserFile /var/www/sites/.htpasswd
6 <RequireAny>
7 Require ip 19.233.95.152
8 Require ip 31.169.217.174
9 Require ip 33.202.255.41
10 Require ip 31.175.111.184
11 Require ip 51.209.11.159
12 Require ip 129.162.144.55
13 Require valid-user
14 </RequireAny>
15...
16...
See https://stackoverflow.com/questions/10419592/htaccess-htpasswd-bypass-if-at-a-certain-ip-address