Andymator
Posts: 25
Joined: Sat Jun 30, 2018 9:38 am

Getting mac-adresses for 40 pies

Wed Oct 31, 2018 9:38 am

Hello
I need to get the mac-adresses for 40 pies (for a school project) in order to be able to configure the schools network in a way that allows the pies to get access without having to sign in.

I thought it would be easy to get the mac adress of a pi. Something like opening a terminal and writing a few words, but now im not so sure any more. I have tried writing ifconfig eth0 and some other things. I have also checked what my router says about the mac-adress of the connected pi. It seems to be changing. I thought that the mac adress what something static. I have no idea what to write down as the mac adress of the pi. The scools network guy wants a list of all 40 mac adresses for the pies. He has already prepared everything and only need the adresses.

Can someone help me please :)

User avatar
RaTTuS
Posts: 10381
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 9:53 am

sudo ifconfig | grep ether
should report somehign similar to

Code: Select all

 sudo ifconfig | grep ether
        ether b8:27:eb:3d:c1:8c  txqueuelen 1000  (Ethernet)
        ether b8:27:eb:68:94:d9  txqueuelen 1000  (Ethernet)
the first is eth0 the 2nd is wlan0
as long as you don't have predictable network names
sudo ifconfig will show all the info the MAC is the ether portion

if you have them on a windows network you may be able to see them with
arp -a | grep b8-27
using a windows command prompt
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

jahboater
Posts: 4595
Joined: Wed Feb 04, 2015 6:38 pm

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 10:03 am

Perhaps:-

Code: Select all

$ sudo nmap -sn 192.168.0.0/24 | grep MAC
MAC Address: 90:01:3B:7B:A3:0A (Sagemcom Broadband SAS)
MAC Address: 00:1E:06:33:73:12 (Wibrain)
MAC Address: 00:19:FB:99:AA:D6 (BSkyB)
MAC Address: 00:22:61:5E:D2:39 (Frontier Silicon)
MAC Address: B8:27:EB:95:F7:84 (Raspberry Pi Foundation)
MAC Address: 00:E0:4C:36:D6:EC (Realtek Semiconductor)
$ 

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 10:05 am

ip link
should work either.

Andymator
Posts: 25
Joined: Sat Jun 30, 2018 9:38 am

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 2:15 pm

Code: Select all

 sudo ifconfig | grep ether

Thanks for your help.
I tried the above code and it does get me two different mac adresses. Just like you said.
Which one of them is the one I should give to the schools network guy so that he can make the pi automaticly get access to the wifi?
I am on a different wifi at the moment.

W. H. Heydt
Posts: 10618
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 2:35 pm

Andymator wrote:
Wed Oct 31, 2018 2:15 pm

Code: Select all

 sudo ifconfig | grep ether

Thanks for your help.
I tried the above code and it does get me two different mac adresses. Just like you said.
Which one of them is the one I should give to the schools network guy so that he can make the pi automaticly get access to the wifi?
I am on a different wifi at the moment.
It depends on how you're connecting...the first one (eth0) for a wired connection. The second one (wlan0) for a wireless connection. Or both if either method might be used.

Andymator
Posts: 25
Joined: Sat Jun 30, 2018 9:38 am

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 2:42 pm

W. H. Heydt wrote:
Wed Oct 31, 2018 2:35 pm
Andymator wrote:
Wed Oct 31, 2018 2:15 pm

Code: Select all

 sudo ifconfig | grep ether

Thanks for your help.
I tried the above code and it does get me two different mac adresses. Just like you said.
Which one of them is the one I should give to the schools network guy so that he can make the pi automaticly get access to the wifi?
I am on a different wifi at the moment.
It depends on how you're connecting...the first one (eth0) for a wired connection. The second one (wlan0) for a wireless connection. Or both if either method might be used.
Aha. I understand. They will be connected with a wireless connection. So I'll go for the second one then. Thanks!

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 2:49 pm

Let me get this straight. Access to the network will be granted to any machine with a MAC address that you are about to give the admins?

So anyone can set any machine they have to use one of those MAC addresses and get access to the network without any other credentials?

This sounds about as secure as something that is not secure at all !

ejolson
Posts: 3259
Joined: Tue Mar 18, 2014 11:47 am

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 3:03 pm

Heater wrote:
Wed Oct 31, 2018 2:49 pm
Let me get this straight. Access to the network will be granted to any machine with a MAC address that you are about to give the admins?

So anyone can set any machine they have to use one of those MAC addresses and get access to the network without any other credentials?

This sounds about as secure as something that is not secure at all !
The MAC addresses are probably not so much about security as assigning IP numbers and getting a telephone number of who to call in case the machine gets infected.

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 3:33 pm

In that case, why does everyone else have to sign in?

ejolson
Posts: 3259
Joined: Tue Mar 18, 2014 11:47 am

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 4:54 pm

Heater wrote:
Wed Oct 31, 2018 3:33 pm
In that case, why does everyone else have to sign in?
At my school, if you don't have a network ID and password (or eduroam) then you must connect to the guest network and fill out a web form with your name and other details before the firewall lets you onto the Internet.

I can't answer for the present case, but I suspect using a registered MAC address allows one to bypass the web form. While you could spoof the MAC address of an already registered machine, you might be able to use someone else's name on the web form as well. Either is likely to result in school disciplinary action. Where I am WiFi is segmented from the wired network: remote desktop and secure shell is allowed to go through but not printing, Samba or NFS. I have no idea what the security setup is for the person who made the original post. As students tend to be somewhat curious and access less tightly controlled, school intranets may need and as a result have more layers of security than some corporate networks.

W. H. Heydt
Posts: 10618
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 5:06 pm

Heater wrote:
Wed Oct 31, 2018 2:49 pm
Let me get this straight. Access to the network will be granted to any machine with a MAC address that you are about to give the admins?

So anyone can set any machine they have to use one of those MAC addresses and get access to the network without any other credentials?

This sounds about as secure as something that is not secure at all !
It's the illusion of security for those who don't know better. One might suspect--possibly even correctly--that the IT folks are aware of MAC spoofing, but it's a near certainty that the school or district administrators have no clue about actual IT security.

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 5:12 pm

How does "disciplinary action" help. An unknown student, or perhaps staff, spoofs a MAC address, gets on the network, causes mayhem, then disappears. Who are they going to discipline? Unless said bad actor does it repeatedly and inevitably gets tracked down.

School networks have two major attackers. Bad guys from the outside. Students and staff from the inside. Corporate networks are much the same.

ejolson
Posts: 3259
Joined: Tue Mar 18, 2014 11:47 am

Re: Getting mac-adresses for 40 pies

Wed Oct 31, 2018 6:56 pm

W. H. Heydt wrote:
Wed Oct 31, 2018 5:06 pm
One might suspect--possibly even correctly--that the IT folks are aware of MAC spoofing, but it's a near certainty that the school or district administrators have no clue about actual IT security.
This might depend on the school: the IT folk at Cambridge, MIT, CMU or Berkley are likely to know more about network security than the IT folk at Aldermoor Farm Primary.

Even on home networks, it is not unreasonable to assume there could be unauthorised access and to secure the interior network accordingly. What this means for most people is to be careful using any unencrypted protocol without further segmentation of the internal network and to take those ssh fingerprints seriously.
Heater wrote:
Wed Oct 31, 2018 5:12 pm
School networks have two major attackers. Bad guys from the outside. Students and staff from the inside. Corporate networks are much the same.
Agreed. However, students sometimes behave differently than staff when it comes to mucking about with computers and networks. I suspect behaviours related to automobiles, food and drink are also different. For example, how many staff members are likely to throw a pickle across the cafeteria at lunch time?

Return to “General discussion”