Last post May 09, 2017 07:53 AM by Eric Du
May 08, 2017 09:23 AM|pamyral_279|LINK
I have list IP range in my country:
From IP -----To IP ------Total IPs
18.104.22.168 ---22.214.171.124 ---262144
126.96.36.199 ---188.8.131.52 ----4096
I have idea to perform function checkIP in Page_Load() , mean that any IP outside above list can see my website ?
How can i do that ?
Thank you so much !
May 08, 2017 11:20 AM|kaushalparik27|LINK
I doubt if blocking by IP would ever work, since it is quite easy (proxy sites and all..) to bypass it.I mean even if you block my IP to access your website, I can get in to it easily by using any proxy Website/Server/VPN. Site access by username and password
is more secure way.
However, if that is still required as per your business requirement, then I suggest to refer:
How to Block Country and IP Addresses in ASP.NET using HTTPModule?
May 09, 2017 07:53 AM|Eric Du|LINK
According to your description, as far as I know, this issue is the block specify IP address. Here are some tutorials about how to set the limitation of the specify IP access website in
IIS, please check these tutorials:
Programmatically add/remove IP Security Restriction with C# ASP.NET:
Restrict IP Address in ASP.NET Web API:
Blocking IIS IP Addresses with ASP.NET: