Hi Namit,
Yes you can block on both IPTables or an .htaccess file.
Using IPTables you can run the following command to allow access from a specific IP address and block all others.
iptables -A INPUT -p tcp --dport 80 -s YOUR_IP_ADDRESS -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
Save the IPTables rules to persist across reboots
iptables-save > /etc/iptables/rules.v4
Then Restart the IPTables.
systemctl restart iptables
____________________
On .htaccess here how you can block.
order deny,allow
deny from all
allow from YOUR_IP_ADDRESS
Both methods will restrict access
Good luck