Host Name Banning

Discussion in 'Programming' started by twalters84, Sep 9, 2007.

  1. #1
    Greetings,

    I am working on a banning utility for my client. Right now, he is able to ban by username and by IP address.

    We are working on a way for him to ban by hostname. I realize banning by hostname has its downfalls in that you may end up banning more than one user, but I think having the feature as a precaution is a plus.

    I already have code in place for hostname resolution from an IP address.

    76.235.189.36 -> adsl-76-235-189-36.dsl.klmzmi.sbcglobal.net
    207.255.198.136 -> 207-255-198-136-dhcp.cbe.md.atlanticbb.net

    The thing I am wondering about is this.. hostname banning should only be used for dialup users because they are the only people that can get a new IP address very easily. So if we have to ban a dialup user, then what part of the hostname do we use?

    For example, in the hostnames above would be use dsl.klmzmi.sbcglobal.net and dhcp.cbe.md.atlanticbb.net? If we searched for those strings in a user's hostname, would that user always be banned regardless of the IP address?

    Thanks for any suggestions you might have.

    Sincerely,
    Travis Walters
    admin@codebuyers.com
     
    twalters84, Sep 9, 2007 IP
  2. livehybrid

    livehybrid Active Member

    Messages:
    100
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    Yes it would ban all users with that hostname (may be all users on that provider.)
     
    livehybrid, Sep 10, 2007 IP
  3. twalters84

    twalters84 Peon

    Messages:
    514
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Greetings,

    Thanks. Thats what I wanted to hear :)

    I guess I could go as far as to put a * in place of the IP address in the host name like:

    adsl-*.dsl.klmzmi.sbcglobal.net

    Host name banning is a really a last resort but its nice to have your basics covered. Thanks again.

    Sincerely,
    Travis Walters
     
    twalters84, Sep 10, 2007 IP