Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change MAC on EC2 instance with Amazon Linux #74

Open
llamafilm opened this issue Mar 4, 2021 · 2 comments
Open

Can't change MAC on EC2 instance with Amazon Linux #74

llamafilm opened this issue Mar 4, 2021 · 2 comments

Comments

@llamafilm
Copy link

I'm trying to change the MAC address of an EC2 instance running Amazon Linux 2 but I get this error. I'm running as root.

# /usr/local/bin/macchanger -a eth0
Current MAC:   06:81:00:44:12:55 (unknown)
Permanent MAC: 06:81:00:44:12:55 (unknown)
[ERROR] Could not change MAC: interface up or insufficient permissions: Operation not supported

I tried a simple shell script like this, but this kills the internet connection and it never comes back.

ip link set eth0 down
macchanger -a eth0
ip link set eth0 up

Some details about the system:

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 06:81:00:44:12:55 brd ff:ff:ff:ff:ff:ff

# uname -r
4.14.219-161.340.amzn2.x86_64

# lspci -v -s :00:05.0
00:05.0 Ethernet controller: Amazon.com, Inc. Elastic Network Adapter (ENA)
	Physical Slot: 5
	Flags: bus master, fast devsel, latency 0
	Memory at febf4000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [b0] MSI-X: Enable+ Count=9 Masked-
	Kernel driver in use: ena
	Kernel modules: ena
@streamdp
Copy link

streamdp commented Nov 11, 2021

May be it is not supported by the driver ENA?. Check out this issue # 141 you can reopen the issue and one of the authors can help you.

@barickdebayan
Copy link

How to enable this feature in ENI or ENA ? any specific aws cli command ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants