Raised This Month: $ Target: $400
 0% 

BAN by MAC (!IP, !STEAM/WON_ID) possible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
d-Metrius
Junior Member
Join Date: Apr 2005
Location: Moscow, Russia
Old 04-09-2005 , 18:49   BAN by MAC (!IP, !STEAM/WON_ID) possible?
Reply With Quote #1

I run a CS server in a small LAN. I really need an ability to BAN players by their MACs. If I ban their IPs - they can easily change it. I can't ban their IDs, coz they all have the same one - VALVE_ID_LAN. I also CAN'T re-configure my LAN for IP->MAC bindings - I just dont have such access. So, is it possible by AMXX or any other server mod (or even metamod) to ban players by MACs?
__________________
$ id
uid=0(root), gid=0(root)
$ whoami
root
d-Metrius is offline
Send a message via ICQ to d-Metrius
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-09-2005 , 19:06  
Reply With Quote #2

If they don't have "STEAM" in their STEAM ID, you can always kick them upon connecting.
Code:
#include <amxmodx> public plugin_init() {     register_plugin("Kick Macs","0.1","v3x") } public client_connect(id) {     new steamID[36]     get_user_authid(id,steamID,35)     new userID = get_user_userid(id)     if(!(containi("STEAM",steamID))) {         server_cmd("kick #%d",userID)     }     return PLUGIN_HANDLED }
I think that'd work.. ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
d-Metrius
Junior Member
Join Date: Apr 2005
Location: Moscow, Russia
Old 04-09-2005 , 19:15  
Reply With Quote #3

I think you misunderstood me a bit.

ALL clients on LAN (with sv_lan 1 on server) with LAN (CyberCAFE Edition - NO STEAM - No Internet is needed to connect to the server) clients have VALVE_ID_LAN in STEAM/WON ID cvar.

I can only ban players by IP. But a banned user can easily change his IP to something else (e.g. 10.2.72.16 to 10.2.79.99) and he will be able to play. The only way to really ban them is to ban via MAC (hardware address of network device). Is there any functions/HL APIs to get a player's MAC? Can this be done?

p.s. I need someone 'Network-knowledged' to answer. If you don't know what is MAC adress - don't bother answering - you'll save time for both of us. :wink:
__________________
$ id
uid=0(root), gid=0(root)
$ whoami
root
d-Metrius is offline
Send a message via ICQ to d-Metrius
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 04-09-2005 , 23:08  
Reply With Quote #4

no sry. i wish this was possible too.
Freecode is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-10-2005 , 05:56  
Reply With Quote #5

Well, hrm, you could make a metamod plugin which does this when players connect:

1) Get their IP address
2) Do some kind of ARP lookup to get their MAC address
3) Check whether the MAC address is banned
4) If yes, kick them
__________________
hello, i am pm
PM is offline
d-Metrius
Junior Member
Join Date: Apr 2005
Location: Moscow, Russia
Old 04-10-2005 , 07:10  
Reply With Quote #6

But how to do ARP requests? With which METAMOD/HL API functions?
__________________
$ id
uid=0(root), gid=0(root)
$ whoami
root
d-Metrius is offline
Send a message via ICQ to d-Metrius
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-10-2005 , 08:21  
Reply With Quote #7

You'd have to use some system function. It will be different between windows and linux.

Maybe this could work on linux:
http://lava.net/~newsham/progs/arp.c
__________________
hello, i am pm
PM is offline
d-Metrius
Junior Member
Join Date: Apr 2005
Location: Moscow, Russia
Old 04-10-2005 , 09:34  
Reply With Quote #8

Can I include system or third-party #incs in plugin or module (AMXX) and use them?
__________________
$ id
uid=0(root), gid=0(root)
$ whoami
root
d-Metrius is offline
Send a message via ICQ to d-Metrius
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-10-2005 , 11:04  
Reply With Quote #9

Modules, yes.
Johnny got his gun is offline
d-Metrius
Junior Member
Join Date: Apr 2005
Location: Moscow, Russia
Old 04-11-2005 , 08:53  
Reply With Quote #10

Can anyone provice a 'quick-start' guide for writing a module with MAC Ban support? Never done this...
__________________
$ id
uid=0(root), gid=0(root)
$ whoami
root
d-Metrius is offline
Send a message via ICQ to d-Metrius
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode