Logging incoming MAC-addresses

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
WoAyumi
A regular
A regular
Posts: 52
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Apr 28, 2012 6:24 pm

Logging incoming MAC-addresses

Post by WoAyumi »

Dear NFOServers,

In my log I can see only the router's mac-address as the incoming mac-address because the router stands between my machine and a client's machine. Is there any possibility to make my machine able to log the incoming mac-addresses of clients' machines?
Thank you.
User avatar
Spray
Former staff
Former staff
Posts: 630
Joined: Wed Dec 28, 2011 10:41 pm
Location: Oregon

Re: Logging incoming MAC-addresses

Post by Spray »

The only way to get the MAC address of another client would be if they were directly connected to your machine. MAC addresses are used for direct communication between two network devices. As soon as a client connection passes through any HOP (their home router, their ISP's network) that MAC address is dropped as it's no longer required for communication, as then the discussion moves to the next two pieces of networking devices.
User avatar
Edge100x
Founder
Founder
Posts: 13112
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Logging incoming MAC-addresses

Post by Edge100x »

Spray's absolutely right. MAC addresses are used at the second layer of the networking stack to direct ethernet traffic to the correct physical device. Unless the client device is on the same physical network segment, it can only reach your server by first going through a switch or router, which means that the ethernet frames will always contain that switch/router's MAC address as the source.
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Logging incoming MAC-addresses

Post by WoAyumi »

What would be the best alternative for me to effectively block an attacker who uses different IP addresses, with the possibilities given?
Thank you, guys!
User avatar
Edge100x
Founder
Founder
Posts: 13112
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Logging incoming MAC-addresses

Post by Edge100x »

Without knowing the details of the attack, it's difficult to say. If the person is connecting and interacting with a service, such as a game server, you may be able to block by a game-specific identifier such as a SteamID.
Post Reply