Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Banning in ASP.NET 1

Status
Not open for further replies.

aaronjonmartin

Technical User
Jul 9, 2002
475
GB
Hi guys, bit of a weird one this but wondering if anyone can provide some further information on something i have been thinking about.

Im currently building a website which allows users to register accounts. Now I was thinking about how I could, using ASP.NET, create some kind of IP banning functionality much like forums have for nuisance users.

Is this something that would be possible in ASP.NET? If not, how else could I do something similar?

If anybody can provide any information or links on how this could work (or not) I would be most appreciative.

Aaron

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
It is possible (as it's easy to get the user's IP Address) but it might not be that practical. For example, if the user is on a dynamic IP address they may get a different one each time they log onto their PC. To combat this you could block an IP Range but then you risk blocking potential valid users.

Rather than do this, when the user signs up send them a confirmation email. Once they reply to this email their account twill be validated. You can then hold a "banned email address" table and block these users. Yes, they will be able to create a new account by opening a second email account but they will soon get bored of this if you keep banning them.

As an additional measure you could still capture their IP address and anyone signing up with different email addresses but the same IP, you know you will have to keep an eye on them.




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Excellent reply ca8msm thankyou very much.

How can you capture a users IP address using .net?

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
ca8msm said:
You can then hold a "banned email address" table and block these users.
I meant to say that each person who needs to be banned can be entered into the table, not just everyone who confirms their wish to join your site! [blush]


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Try looking at Request.ServerVariables("REMOTE_ADDR")


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thanks again

"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
 
What if you captured the pc's id (hardware id), and use that for banning purposes ? Could this i saying work ?
 
That won't work unless you are using an activex component, windows authentication, your users are using IE and that they accept the component.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top