You must have seen some topics about this on the forums or elsewhere on the web and here is a new one. I have searched the web for a solution, but i can't find it and many information looks outdated. However i came pretty far i must say. But its still not working when the MAC-address has been changed.
I'm running: FreeBSD 11.0-ALPHA3 release(?): 301873 on a Raspberry PI 2 and my goal is to change the MAC-address on boot with a random new address.
So I've tried making a start_if.ue0 file, containing:
I also tried link or ether instead of lladdr.
which does work. The mac-address is changed. However, my connection with my network is completely gone.
I've tried to restart: /etc/rc.d/netif && /etc/rc.d/routing. The last one makes sure the routes are gone. I didn't solve it by manually adding the routes.
My interface without changing the MAC-address:
My interface with changing the MAC-address:
My rc.conf:
I also checked the logging of the RPI and my router. There are no network-related errors. I'm stuck. Can anyone point me in the right direction?
Update 1: I checked the arp-table of my router. It still had the old mac address. I deleted it and added a static one; still the same issue.
Update 2: I did find a workarround, which is putting my interface in promiscuous mode. But i dont think that is desirable.
I'm running: FreeBSD 11.0-ALPHA3 release(?): 301873 on a Raspberry PI 2 and my goal is to change the MAC-address on boot with a random new address.
So I've tried making a start_if.ue0 file, containing:
Code:
#!/bin/sh
ifconfig ue0 lladdr `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
which does work. The mac-address is changed. However, my connection with my network is completely gone.
I've tried to restart: /etc/rc.d/netif && /etc/rc.d/routing. The last one makes sure the routes are gone. I didn't solve it by manually adding the routes.
Code:
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.1.1 UGS ue0
127.0.0.1 link#1 UH lo0
192.168.1.0/24 link#2 U ue0
192.168.1.9 link#2 UHS lo0
Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 UGRS lo0
::1 link#1 UH lo0
::ffff:0.0.0.0/96 ::1 UGRS lo0
fe80::/10 ::1 UGRS lo0
fe80::%lo0/64 link#1 U lo0
fe80::1%lo0 link#1 UHS lo0
ff02::/16 ::1 UGRS lo0
Code:
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
ether bX:2X:eX:Xe:X9:0X
inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
ether 8a:b9:bd:1a:48:c8
inet 192.168.1.9 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Code:
hostname="redacted"
ifconfig_ue0="inet 192.168.1.9 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
gateway_enabled="YES"
sshd_enable="YES"
powerd_enable="YES"
# Nice if you have a network, else annoying.
#ntpd_enable="YES"
ntpd_sync_on_start="YES"
background_dhclient="NO"
icmp_drop_redirect="NO"
ftpd_enable="NO"
icmp_bmcastecho="NO"
# Uncomment to disable common services (more memory)
#cron_enable="NO"
syslogd_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
# On first boot, enlarge the root filesystem to fill the SD card
growfs_enable="YES"
#Disable IPV6
ipv6_defaultrouter="NO"
ip6addrctl_enable="NO"
ip6addrctl_policy="ipv4_prefer"
ipv6_activate_all_interfaces="NO"
ipv6_network_interfaces="none"
route6d_enable="NO"
ipv6_gateway_enable="NO"
ipv6_default_interface="NO"
Update 1: I checked the arp-table of my router. It still had the old mac address. I deleted it and added a static one; still the same issue.
Update 2: I did find a workarround, which is putting my interface in promiscuous mode. But i dont think that is desirable.
Last edited: