0

My dad connects to his Zero over a mico-usb rj45 dongle, using SSH.

Trying to change the MAC of the cheapo dongle using MACCHANGER, he disabled ETH0 (using ETH0 down) so any change of MAC wouldnt impact the live connection....

Of course, disabling ETH0 also disabled his ability to SSH in! Doh!

K, so without conencting the zero to a TV, keyboard etc (he hasnt got any USB ones)...

  1. Can he manually bring the ETH0 back up, by putting the SD Card in his (Win10) PC and editing a file?

  2. Which file to edit?

  3. Ultimately, can you use MACCHANGER to change the MAC of an external micro-usb rj45 adaptor? (Basically, the adapters so cheap, they havent bothered buying unique MAC's, and it conflicting with another MAC).

Thanks

1 Answer 1

1

Your best option is to mount the SD card on a running Linux and from there manually edit the zero files.

The ifdown eth0 state is not persistent between reboots, the interface should be up on your next boot, unless, was defined otherwise on /etc/network/interfaces file.

Your eth0 interface should be as follows for automatic dhcp configuration.

auto eth0
iface eth0 inet dhcp

You can also set the new MAC hardware address:

allow-hotplug eth0
iface eth0 inet dhcp
   hwaddress ether 08:00:00:00:00:01

Or you can change the default mac address:

ifconfig eth0 down
ifconfig eth0 hw ether 08:00:00:00:00:01
ifconfig eth0 up

If you are working on a zero with no other access but your ssh connection, I recommend to buy a simple USB TTL Serial Cable and then use puTTY to talk to your serial port. You will not be able to do changes on your eth0 while connected.

You can experiment and write a small bash script, add configuration commands, and then run it in background process (batch). If you are connected, you will get disconnected and the process will abort.

pd. sudo omitted for brevity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.