Results 1 to 19 of 19

Thread: winsock chat ban id help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Exclamation winsock chat ban id help

    i need experts to show me very basic example how to ban an user id in winsock chat

    list2 shud contain barred ids so if any user's login with banned id they shud get a message from server saying this id is barred please use another id please help

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: winsock chat ban id help

    You would do basically the same as the ignore except instead of just not showing the text you would disconnect the user or check when they first try to login and not allow them to connect at all.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat ban id help

    ahh nice thanks boss

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    You should have a boot file for all users that have been booted. If a User has not been booted or a user has passed his boot termination date then remove the boot file and allow sign-in.

    When user signs in check if user has a file called "boot"

    If Dir("path-to-users-info" & "\boot") = "" Then ....... user is OK, allow sign-in

    Load the boot file and check the termination date.

    If termination date is equal or less than today's date then remove boot file and allow user to sign in.

    When you do boot a user create a boot file that contains the termination date like mm/dd/yyyy

    This is always handled by the Server
    Last edited by jmsrickland; Nov 14th, 2012 at 05:50 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: winsock chat ban id help

    You may also like to consider saving the IP Addresses of banned users and every time someone attempts to connect, check if the IP Address matches any of those saved and if they do, then don't allow the connection. In extreme cases you could ban a range of IP Addresses (like many Forums can do) if spamming becomes an issue.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    How do you get the range of IP addresses? Also, testing your client/server project on your own PC would be quite difficult since all clients are running on the same IP.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  7. #7
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: winsock chat ban id help

    It really is quite simple. Say I wanted to Ban 192.168.1.10 to 192.168.1.20, I just look at the IP of the connecting client and check if their address falls within that range. Testing in your own network is simple (given you have more than one PC). Set the Ban range, set an IP address of a PC in the network to one within the range and see what happens. Then set it to another address within the range and see what happens etc then set it to one outside the range and see what happens.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat ban id help

    i just added a coud in clients using i net to grab client user ip put ip in textbox and from server u can just select an id and click grab ip and it will get that users ip and make range for it

  9. #9
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    OK, so how do you know that the range is .....1.10 to ......1.20? Is this just an arbitrary assignment? Could the range be like ......255.255?

    For now, I can only test on one PC but when I get access to the other PC I will try your approach.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat ban id help

    192.168.1.0-192.168.1.255 this is how u make range example

    as u se 192.168.1.10 as u se the last 2 digit is the main putting the last digit to 255 can block his ip like this

    192.168.1.10
    192.168.1.11
    192.168.1.12 << up to 255

  11. #11
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    So if I understand you correctly the range is only on the last nnn number and not the first three sets of numbers.

    nnn.nnn.nnn.001

    to

    nnn.nnn.nnn.255

    Now, using IP ranges then I assume it is possible to determine if a user is banned at the time he makes a connection; during the ConnectionRequest event, by simply checking the incoming IP with a set of ranges stored in a IP Range file. Now if same user connects from somewhere else then you have to check the user ID in the DataArrival event when the user ID comes in on the .GetData.

    Question:

    Is it possible that one user can have a range 001 to 127 and another user have a range from 128 to 255 or is that a single user can have a range of 255 IP addresses and at any given time will have one of those 255 possibilities?
    Last edited by jmsrickland; Nov 16th, 2012 at 06:59 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat ban id help

    this is the ip 192.168.1.10 and the range starts from xxx.xxx.1.10 the last 2 digits highlighted in red those are the 2 main digit you put a range on them even they are on dynamic ip they will get blocked , 225 is the maximum range in ip if you set it like this 192.168.1.0-192.168.1.255 this user will not beable to use it no more because your tool will detect his range depending on how you set up your programme , this range method works 10000% in whm, whm firewall or your pc firewall , its all about you setting up your tool in way so if it detects that range from 192.168.1.0-192.168.1.255 then kill connection.

    yes its possible people can have such range ip
    Last edited by bogaa; Nov 16th, 2012 at 08:25 PM.

  13. #13
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    That doesn't appear to make any sense.

    It's like saying one person can have any IP 192.168.1.0 to 255. Therefore, why test on 0-255 when those numbers will always appear on the IP of 192.168.1 so if the 1st 3-sets are 192.168.1 then we are talking about one person with a possible 256 IPs in his range. See what I mean?

    Why do this.....

    Code:
    If IP = 192.168.1 Then
      If LastSet => 0 And LastSet <= 255 Then '<---- This will always be the case
        BanThisUser
      End If
    End If
    Why not just test the 192.168.1 part? We already know the last set of numbers will be anywhere from 0 to 255

    And now that doesn't make any sense either. It's like saying there are a possible of 256 people who can use 192.168 because the next set of number will be 0 to 255 (the 256 persons) and then the next set of numbers after that will be 0 to 255 (the range of each person)
    Last edited by jmsrickland; Nov 16th, 2012 at 09:07 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat ban id help

    my ip is dynamic as i just replied last night my ip last digit was 255 believe or not if i se it again il show u snapshot.

    i never made ip range blocker in vb6 but am sure someone has in here i am just trying to help you understand the range format and i will look up for help for u

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Thumbs up Re: winsock chat ban id help

    my ip is dynamic as i just replied last night my ip last digit was 255 believe or not if i se it again il show u snapshot.

    i never made ip range blocker in vb6 but am sure someone has in here i am just trying to help you understand the range format and i will look up for help for u

  16. #16
    New Member
    Join Date
    Sep 2012
    Posts
    8

    Re: winsock chat ban id help

    Using IP addresses is quite confusing in this situation. I do a lot of User Bans in my Database Systems and I use the UserID that
    is registered in the system. If you use IP address there would be a tendency that the Banned User might use another PC (which has a
    different IP Address).

    About IP ranges, yes you can use IP ranges to ban multiple
    users assuming that each user is indexed to an IP.

    Like the example given a range from 192.168.1.10 -> 192.168.1.20,
    You can have this algorithm:

    If IP(nnn.nnn.n) = BannedIP(nnn.nnn.n) Then
    If LastDigits is between Banned Range Then
    Block User from Access.
    End if
    End if

    You still have to save the first 3 sets on a field and a the on two different fields.
    The table would look something like this:
    ban_id ban_IP rangeFrom rangeTo
    -------------- ---------------- ----------------- ------------------
    1 192.168.1 10 20


    hope this will help.

  17. #17
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    My problem is not how to ban using IP it's understanding IP as I pointed out in my post #13.

    It doesn't make sense to me to say that any person can have an IP range of nnn.nnn.nnn.xxx

    where xxx is 0 to 255. If that is so then it follows that IP nnn.nnn.nnn is the base IP so why bother to check the ranges when the base will do the same thing. Now, if this is so then it follows that only 256 people can have an IP address of nnn.nnn.nnn.xxx and that's not very many people so I don't think this is how it works.

    In other words:

    nnn.nnn.001.000 to nnn.nnn.001.255 is for one person
    nnn.nnn.002.000 to nnn.nnn.002.255 is for another person
    etc
    etc
    nnn.nnn.255.000 to nnn.nnn.255.255 is for the 256th person

    and this I do not think is the case


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  18. #18
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: winsock chat ban id help

    My suggestion of banning a range of IP Addresses was to eliminate the determined spammer. Many people connect to the Internet through an ISP. Their ISP has a range or ranges of IP Addresses they can allocate to Customers. The particular address that any given customer is allocated can change every time they connect to the Internet. (eg. over here, one of the ranges allocated to BT is 86.136.0.0 - 86.141.255.255) How that range of addresses is actually allocated to their customers is up to BT (eg it might be based on Geography), but for example, let's say my current IP address is 86.136.82.10. I decide to start to spam Bogaa's chat. Bogaa will ban my user id. I then re-register and start spamming again as a different user; Bogga bans me again, I re-register again, continue to spam and it just goes on and on. So, Bogaa looks at the log of connections and sees that, over a period of time, the users they've banned always have an IP Address in the range, say, of 86.136.82.10 to 86.136.82.200 since i've used addresses in that range, so they ban that range of IP Addresses to stop me. (or the complete sub-net 86.136.82 or even sub-net 80.136 is banned). Thus, unless I change my ISP I cannot connect to his chat system. Meanwhile, Bogga reports me to my ISP for abuse (he's got all the dates, times, IP Addresses etc as evidence from which my ISP can identify me personally), and hopefully they take action. That being the case, Bogaa can later un-ban the address range.

    It's a very blunt instrument, since any innocent soul who happens to have an address in that range allocated to them and wants to join the chat will not be able to. It's a tool that can be used sparingly by Administrators of Forums, such as these, to help eliminate spamming, usually as a 'last resort'. (In a Forum of which I am an Administrator we have actually had cause to ban a complete ISP as they were just a haven for spammers)
    Last edited by Doogle; Nov 20th, 2012 at 03:24 AM. Reason: Spelling

  19. #19
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat ban id help

    That makes sense. I often thought but wasn't sure that when a person is banned by IP range that somewhere along the line an innocent person who just happened to be in that same range would also be banned because of someone else. Thanks, Doogle, that clears it up for me.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width