PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: Azurious on 13 June, 2009, 13:35:16

Title: banning by macaddress!
Post by: Azurious on 13 June, 2009, 13:35:16
I have a pppoe network & whenever a user login he gets a new ip randomly assign by the server. so we can't ban them by ip address, so i need a script from which we can ban mac address of thier lancard, they cannot change mac address because it is bind to their usernames in pppoe server.

please someone put light on this issue..
Title: Re: banning by macaddress!
Post by: PPK on 13 June, 2009, 14:09:57
It is not possible.
Title: Re: banning by macaddress!
Post by: Azurious on 13 June, 2009, 17:29:28
 :-[ :-[ :-[ :-[ No More Hopes :-[ :-[ :-[ :-[

Any other idea how we can stop them?
else no use of admins & ops

and everything is feasible in this world  ;)
Title: Re: banning by macaddress!
Post by: Scanning on 13 June, 2009, 20:17:56
Can you see the hostname ? like username.100.254.host.domainsuffix if you ping the ip ? if so it can prolly be fixed with script if the "username" is a fixed/permanent username

or you can use softwarefirewall and ban that mac in it ( if you can extract mac from ip ) if you are on same subnet/lan
Title: Re: banning by macaddress!
Post by: CrazyGuy on 15 June, 2009, 14:37:53
MAC-addresses are not unique. Do not use them to ban people on.
Title: Re: banning by macaddress!
Post by: PPK on 10 July, 2010, 16:30:26
Next PtokaX testing will have added get mac address to lua api to prove how bad idea mac address banning is :P It will allow to make script for mac address bans.
Title: Re: banning by macaddress!
Post by: PPK on 11 July, 2010, 04:27:58
I'm accidentally found in msdn how to get mac address with few lines of code, so why not give it try ;)
Of course i can't get MAC from different subnets, for most ips it is returning nil. ARP table in my running windoze have only 14 items and some of them are duplicate. It is not returning mac for localhost adapters, it is not returning mac for anything behind router (sad, i'm expected mac of router in that case and users complaining that they with one mac ban have all users banned ;D) ::)

Result of my getmac script:
Quote
[2010-07-09 01:41:04] <_@o'> No MAC addres found for user PPK (192.168.0.1).
[2010-07-09 01:41:08] <_@o'> No MAC addres found for user [CZ]Titanium (213.xxx.179.xxx).
[2010-07-09 01:41:10] <_@o'> User PePeK (192.168.0.14) have MAC address: 08-00-27-7C-F4-95
Title: Re: banning by macaddress!
Post by: Dessamator on 14 July, 2010, 21:05:55
Given the nature of network protocols, a ban on local network may be possible, but a client on the internet will never return its mac address. The only way this could work perfectly(in theory) would be for the clients to broadcast this information, something that is unlikely, besides the fact that the user could change his client and still remain on the hub.