How to Ban by IP

Results 1 to 19 of 19
  1. #1
    Apprentice rafaeltonholo is offline
    MemberRank
    Apr 2010 Join Date
    6Posts

    ! How to Ban by IP

    Hi,
    In my server, i have any problems with players.
    I would like know if have a way for ban him by ip.
    I know u can do this in Mu, but i didn't see this in any server of PW.
    I Need that URGENTLY!
    Thanks for urs Attention
    and sry my bad English


  2. #2
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: How to Ban by IP

    Don't use the PW server itself as a ban regulator, it just sucks at it

    To ban by account not by IP, just make a new table in MySQL that copies username id and password into it and then just puts random garbage into the authd table until ban is set to expire, tada, that is probably how PWE even does it

    To ban by IP

    iptables -I INPUT 3 -s IPADDRESSHERE -j DROP

    And then either add that to the init.d firewall setup or manually add it each time the server boots, but eitherway that just has the iptables firewall drop all data they try to send to the server

  3. #3
    SON OF MARFEL hrace009 is offline
    MemberRank
    Apr 2009 Join Date
    Pekanbaru, IndoLocation
    1,035Posts

    Re: How to Ban by IP

    what about if that user using dynamic IP address

    i think it more better if band from MAC Address

  4. #4
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: How to Ban by IP

    Quote Originally Posted by das7002 View Post
    Don't use the PW server itself as a ban regulator, it just sucks at it

    To ban by account not by IP, just make a new table in MySQL that copies username id and password into it and then just puts random garbage into the authd table until ban is set to expire, tada, that is probably how PWE even does it

    To ban by IP

    iptables -I INPUT 3 -s IPADDRESSHERE -j DROP

    And then either add that to the init.d firewall setup or manually add it each time the server boots, but eitherway that just has the iptables firewall drop all data they try to send to the server
    No need an extra table. A ban procedure and the forbid table already exist for that.

    - You can make a PHP script for it.
    - You can make a pwAdmin addon for it.
    - You can use BATGM0.8 for it.
    - You can use the ban function with the gm console (lazy way).

    And btw, authd table is used for GM accounts, not for ban ppl......
    Last edited by Romulan; 16-11-10 at 12:34 PM.

  5. #5
    Apprentice vhost is offline
    MemberRank
    Mar 2009 Join Date
    7Posts

    Re: How to Ban by IP

    static ip ban ok
    dynamic ip ban, router reset and you have a new ip

    make more sense would be a ban hostmask that changes but also ...

  6. #6
    Apprentice rafaeltonholo is offline
    MemberRank
    Apr 2010 Join Date
    6Posts

    Re: How to Ban by IP

    Quote Originally Posted by hrace009 View Post
    what about if that user using dynamic IP address

    i think it more better if band from MAC Address
    And who i can do this?

  7. #7
    Robb rbb138 is offline
    MemberRank
    Jan 2009 Join Date
    London, EnglandLocation
    1,241Posts

    Re: How to Ban by IP

    pw doesnt support MAC banning.

  8. #8
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: How to Ban by IP

    Quote Originally Posted by vhost View Post
    static ip ban ok
    dynamic ip ban, router reset and you have a new ip

    make more sense would be a ban hostmask that changes but also ...
    Not where I live...

    My ISP gives out dynamic IP addresses that might as well be static, I've reset router and modem many many times while I've had them for about 3 years now and have had the same IP address since I got it... and no I did not get an static IP from them..

    I also know a lot of other ISPs that do the same specifically to make changing IP address difficult for them (and have better user traceability in the case of fraud etc)

    Quote Originally Posted by hrace009 View Post
    what about if that user using dynamic IP address

    i think it more better if band from MAC Address
    That only works at local scope and can be easily changed, after it leaves the local scope it can no longer be seen
    Last edited by das7002; 16-11-10 at 09:29 PM.

  9. #9
    is making carefully. Szaer is offline
    MemberRank
    Nov 2006 Join Date
    551Posts

    Re: How to Ban by IP

    I'm pretty sure I had a simple way of doing this in my IPlogger pack. :T

    As long as you can block them from registering then you don't need to block them from the game. The IPlogger keeps a record of who registered from what IP, so then you can also go back and see what all accounts they made and ban those too.

  10. #10
    cats addicted Zorno is offline
    MemberRank
    Apr 2010 Join Date
    GermanyLocation
    1,465Posts

    Re: How to Ban by IP

    A simple way is by writing a small program that checks the Hardware ID of the connections and refuse all connections from the "banned" ID. So this computer will be banned. When you combine that with MAC ID its 20% secure ( until that person buys a new PC )
    Good people know how to hide MAC, Hardware ID and other stuff btw so there will never be a 100% secure system.

  11. #11
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: How to Ban by IP

    Quote Originally Posted by Zorno View Post
    A simple way is by writing a small program that checks the Hardware ID of the connections and refuse all connections from the "banned" ID. So this computer will be banned. When you combine that with MAC ID its 20% secure ( until that person buys a new PC )
    Good people know how to hide MAC, Hardware ID and other stuff btw so there will never be a 100% secure system.
    Only flaw in that, as like I said earlier the MAC address is only ever seen on a local scope otherwise we'd be having a way larger issue then IPv4 addresses running out

    The chances of having two machines with the same MAC address on the same local network is so damn low it doesn't really matter, its like how local IP addresses work, don't believe me? Use Wireshark and look at incoming connections to your machine IP address is there but MAC is nowhere to be found (and wireshark shows the entire TCP breakdown)

    It does show a MAC address in the TCP connection, but guess who's it is? Your ISPs router, go ahead and check if you wish, it will be the same on all connections

    So by blocking by MAC address you'll just block everyone as it is a local only identifier

  12. #12
    cats addicted Zorno is offline
    MemberRank
    Apr 2010 Join Date
    GermanyLocation
    1,465Posts

    Re: How to Ban by IP

    Quote Originally Posted by das7002 View Post
    Only flaw in that, as like I said earlier the MAC address is only ever seen on a local scope otherwise we'd be having a way larger issue then IPv4 addresses running out

    The chances of having two machines with the same MAC address on the same local network is so damn low it doesn't really matter, its like how local IP addresses work, don't believe me? Use Wireshark and look at incoming connections to your machine IP address is there but MAC is nowhere to be found (and wireshark shows the entire TCP breakdown)

    It does show a MAC address in the TCP connection, but guess who's it is? Your ISPs router, go ahead and check if you wish, it will be the same on all connections

    So by blocking by MAC address you'll just block everyone as it is a local only identifier
    True. But what if i have a direct connection ? Ok in my case IP ban whould work because i have a static one
    And its still possible to mask MAC adresses *starts to whistle*

  13. #13
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: How to Ban by IP

    Quote Originally Posted by Zorno View Post
    True. But what if i have a direct connection ? Ok in my case IP ban whould work because i have a static one
    And its still possible to mask MAC adresses *starts to whistle*
    There is no such thing as a direct connection on the internet, there are a lot of routers in between each connection even if you are next door neighbors, doesn't make a whole lot of sense all the time but that is just how it works

    Only way to guarantee you see their MAC address is to be on the same exact network as the other machine, which means only one router between you and them or a direct (as in one ethernet cable) connection between the two

    And yes your modem counts as one router so that prevents you from seeing a lot of people's MAC addresses even if they are on the same ISP

  14. #14
    cats addicted Zorno is offline
    MemberRank
    Apr 2010 Join Date
    GermanyLocation
    1,465Posts

    Re: How to Ban by IP

    Quote Originally Posted by das7002 View Post
    There is no such thing as a direct connection on the internet, there are a lot of routers in between each connection even if you are next door neighbors, doesn't make a whole lot of sense all the time but that is just how it works

    Only way to guarantee you see their MAC address is to be on the same exact network as the other machine, which means only one router between you and them or a direct (as in one ethernet cable) connection between the two

    And yes your modem counts as one router so that prevents you from seeing a lot of people's MAC addresses even if they are on the same ISP
    More or less the dslam is a router also.
    But what i wanted to say is, there is no chance to ban someone 100%. If someone wants to get in he will get in

  15. #15
    Apprentice vhost is offline
    MemberRank
    Mar 2009 Join Date
    7Posts

    Re: How to Ban by IP

    "Not where I live...

    My ISP gives out dynamic IP addresses that might as well be static, I've reset router and modem many many times while I've had them for about 3 years now and have had the same IP address since I got it... and no I did not get an static IP from them..

    I also know a lot of other ISPs that do the same specifically to make changing IP address difficult for them (and have better user traceability in the case of fraud etc)"


    Some providers have problems with dynamic ip
    , Yes.
    but not as normal and the ip is not the same.

    ok for me to do this and that would mean that the user gets the ip and the game play, would come not on the server.

    and because of the MAC address that can be changed.

    as I said the router is reset hostmask even with, for one day receive minimum is the same.

    Edit: you can call your provider and ask to receive a response ;)

    ---------- Post added at 10:28 AM ---------- Previous post was at 09:55 AM ----------

    ok, thought

    user has a fixed IP and does not proxy server .... you can, ban ...

    users has dynamic ip or is about proxy server, you ban the ip and the user does what?

    I have played on the malaysia banned from the server as the ip range Telecoms was about proxies, ergo does not ban the ip ...

    I hope I could help :))
    Last edited by vhost; 17-11-10 at 10:02 AM.

  16. #16
    cats addicted Zorno is offline
    MemberRank
    Apr 2010 Join Date
    GermanyLocation
    1,465Posts

    Re: How to Ban by IP

    Quote Originally Posted by vhost View Post
    "Not where I live...

    My ISP gives out dynamic IP addresses that might as well be static, I've reset router and modem many many times while I've had them for about 3 years now and have had the same IP address since I got it... and no I did not get an static IP from them..

    I also know a lot of other ISPs that do the same specifically to make changing IP address difficult for them (and have better user traceability in the case of fraud etc)"


    Some providers have problems with dynamic ip
    , Yes.
    but not as normal and the ip is not the same.

    ok for me to do this and that would mean that the user gets the ip and the game play, would come not on the server.

    and because of the MAC address that can be changed.

    as I said the router is reset hostmask even with, for one day receive minimum is the same.

    Edit: you can call your provider and ask to receive a response ;)

    ---------- Post added at 10:28 AM ---------- Previous post was at 09:55 AM ----------

    ok, thought

    user has a fixed IP and does not proxy server .... you can, ban ...

    users has dynamic ip or is about proxy server, you ban the ip and the user does what?

    I have played on the malaysia banned from the server as the ip range Telecoms was about proxies, ergo does not ban the ip ...

    I hope I could help :))
    banning IPs is crap. Use hotspotshield and whoa you have a new IP ( even with static )

  17. #17
    Enthusiast Suedevander is offline
    MemberRank
    Apr 2011 Join Date
    36Posts

    Re: How to Ban by IP

    how can I see the ip of the guy? and it works there?

  18. #18
    Genesis?Is it a new drug? renan7899 is offline
    MemberRank
    Apr 2010 Join Date
    BrazilLocation
    519Posts

    Re: How to Ban by IP

    Quote Originally Posted by Suedevander View Post
    how can I see the ip of the guy? and it works there?
    Open your server machine or Vbox/Vmware with putty.

    Code:
    apt-get less
    less [PWServerpath]/logservice/logs/world2.formatlog

    Find the login's IP.

    After that create an .sh script with

    Code:
    #!/bin/bash
    
     iptables -I INPUT -s IPHERE -j DROP
    CTRL + O, CTRL + X

    chmod 0755 script.sh

    ./script.sh

    Done.

  19. #19
    Enthusiast Suedevander is offline
    MemberRank
    Apr 2011 Join Date
    36Posts

    Re: How to Ban by IP

    Thnx earned



Advertisement