# Re: How find ruby on rails app client mac address?

**URL:** <https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716>\
**Category:** Rails\
**Created:** [January 5, 2015, 8:23pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716 "2015-01-05T20:23:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 5, 2015, 8:23pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716/1 "2015-01-05T20:23:28Z")

</div>

This sounds like someone doesn’t truely understand how networking  
works…

–Rob  
Sent from my cell, please excuse any typos.  
On Jan 5, 2015 2:19 PM, “Jason Fleetwood-Boldt” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

I don’t believe the MAC address is passed in a TCP/IP request, this is  
used  
by the networking (switches & routers) layer only.

Passing MAC addresses around the internet seems like it could lead to  
people spoofing other people’s machines easily, so that’s probably why  
it  
isn’t done.

Generally in a web app you record the user’s browser using a cookie  
(which  
is tied to a session) and you record the user’s IP address. I’ve never  
heard of anyone recording a MAC address.

-Jason

On Jan 5, 2015, at 12:21 PM, Yasin PEHLİVANLI  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

Hi;  
How to get client login mac address? (ruby on rails)

i am sorry bad english 🙂

–  
You received this message because you are subscribed to the Google  
Groups  
“Ruby on Rails: Talk” group.  
To unsubscribe from this group and stop receiving emails from it, send  
an  
email to removed\_email\_address@domain.invalid.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To view this discussion on the web visit  
[https://groups.google.com/d/msgid/rubyonrails-talk/1034b6d2-e1c8-4e0b-90b8-5c16936e9863%40googlegroups.com](https://groups.google.com/d/msgid/rubyonrails-talk/1034b6d2-e1c8-4e0b-90b8-5c16936e9863%40googlegroups.com)  
[https://groups.google.com/d/msgid/rubyonrails-talk/1034b6d2-e1c8-4e0b-90b8-5c16936e9863%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/rubyonrails-talk/1034b6d2-e1c8-4e0b-90b8-5c16936e9863%40googlegroups.com?utm_medium=email&utm_source=footer)  
.  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

–  
You received this message because you are subscribed to the Google  
Groups  
“Ruby on Rails: Talk” group.  
To unsubscribe from this group and stop receiving emails from it, send  
an  
email to removed\_email\_address@domain.invalid.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To view this discussion on the web visit  
[https://groups.google.com/d/msgid/rubyonrails-talk/D93A60CE-913A-494D-B5D9-A16955ADFB82%40datatravels.com](https://groups.google.com/d/msgid/rubyonrails-talk/D93A60CE-913A-494D-B5D9-A16955ADFB82%40datatravels.com)  
[https://groups.google.com/d/msgid/rubyonrails-talk/D93A60CE-913A-494D-B5D9-A16955ADFB82%40datatravels.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/rubyonrails-talk/D93A60CE-913A-494D-B5D9-A16955ADFB82%40datatravels.com?utm_medium=email&utm_source=footer)  
.

For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Robby\_OSConnor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@Robby\_OSConnor](https://www.ruby-forum.com/u/Robby_OSConnor)\
**Post date:** [January 5, 2015, 8:30pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716/2 "2015-01-05T20:30:54Z")

</div>

Me or the original poster?

If MAC Addresses are passed in the http cycle that is certainly news to  
me since I’ve never heard of that. Obviously switches and hubs use Mac  
addresses at the TCP/IP layer, but remember that the TCP/IP layer is a  
separate layer from the http cycle layer.

-Jason

---

<div class="post-metadata">

**Author:** ![Robby\_OSConnor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@Robby\_OSConnor](https://www.ruby-forum.com/u/Robby_OSConnor)\
**Post date:** [January 5, 2015, 8:32pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716/3 "2015-01-05T20:32:09Z")

</div>

you understand it fine…Original poster.

–Rob  
Sent from my cell, please excuse any typos.  
On Jan 5, 2015 2:29 PM, “Jason Fleetwood-Boldt” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Robby\_OSConnor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@Robby\_OSConnor](https://www.ruby-forum.com/u/Robby_OSConnor)\
**Post date:** [January 5, 2015, 8:32pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716/4 "2015-01-05T20:32:46Z")

</div>

I meant the original poster did not understand it…which is quite  
worrisome.

–Rob  
Sent from my cell, please excuse any typos.

---

<div class="post-metadata">

**Author:** ![Robby\_OSConnor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@Robby\_OSConnor](https://www.ruby-forum.com/u/Robby_OSConnor)\
**Post date:** [January 5, 2015, 8:38pm UTC](https://www.ruby-forum.com/t/re-how-find-ruby-on-rails-app-client-mac-address/233716/5 "2015-01-05T20:38:59Z")

</div>

On Mon, Jan 5, 2015 at 2:22 PM, Robby O’Connor [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> This sounds like someone doesn’t truely understand how networking works…

True, but these days, many (most?) developers don’t. So, I’m tempted  
to just cut him some slack, and point him in the direction of some  
learning.

Yasin, the “standard model” of networking in general can be found at:

[OSI model - Wikipedia](http://en.wikipedia.org/wiki/OSI_model)

The “real” Internet stack is a little bit different, and can be found  
at:

[http://www.w3.org/People/Frystyk/thesis/TcpIp.html](http://www.w3.org/People/Frystyk/thesis/TcpIp.html)

(though this omits the bottom layers found in OSI). You can find a  
more general description of protocol stacks at:

[Protocol stack - Wikipedia](http://en.wikipedia.org/wiki/Protocol_stack)

One important thing to remember is that in a layered architecture  
(such as this), each layer should generally be as ignorant as possible  
of what’s going on at the lower layers. So, I would very much doubt  
that a MAC address would be found in an HTTP request, unless some  
specially modified application were adding it in a custom header or  
some such.

-Dave

–  
Dave A., consulting software developer of [Codosaur.us](http://Codosaur.us),  
[PullRequestRoulette.com](http://PullRequestRoulette.com), [Blog.Codosaur.us](http://Blog.Codosaur.us), and [Dare2XL.com](http://Dare2XL.com).
