Hello everybody,
i try with my best school english from 20 years ago. I decided to change from DDWRT to OWRT because of the newer linux kernel and maybe a working VLAN Configuration. But after the installation i found out that "Overide Mac Adress" for my Wan Port doesnt work, so i asked the internet an found this page.
I tryed to change the wan mac adress like in this descripion an if i used just the terminal its works, but it doesnt work with the script. Maybe you have an idea ...
OpenWrt 19.07.3, r11063-85e04e9f46
-----------------------------------------------------
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr XX:XX:XX:XX:13:3C
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: XX:XX:XX:XX:fe68:133c/64 Scope:Link
inet6 addr: fd3b:3cbd:75a4::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:119 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46964 (45.8 KiB) TX bytes:16720 (16.3 KiB)
eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:13:3C
inet6 addr: XX:XX:XX:XX:fe68:133c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:382 errors:0 dropped:0 overruns:0 frame:0
TX packets:169 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61306 (59.8 KiB) TX bytes:23592 (23.0 KiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr XX:XX:XX:XX:13:3C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:119 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46964 (45.8 KiB) TX bytes:16720 (16.3 KiB)
**eth0.2 Link encap:Ethernet HWaddr XX:XX:XX:XX:13:3D**
inet6 addr: XX:XX:XX:XX:fe68:133d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3910 (3.8 KiB) TX bytes:3596 (3.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1632 (1.5 KiB) TX bytes:1632 (1.5 KiB)
If i enter the commands by hand it works fine.
ifconfig eth0.2 down
ifconfig eth0.2 hw ether XX:XX:XX:XX:64:43
ifconfig eth0.2 up
ifconfig eth0.2
eth0.2 Link encap:Ethernet HWaddr E8:11:32:5A:64:43
inet addr:100.100.131.178 Bcast:100.100.191.255 Mask:255.255.192.0
inet6 addr: fe80::ea11:32ff:fe5a:6443/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9574 (9.3 KiB) TX bytes:17494 (17.0 KiB)
I copied the script and make ist executable by typing chmod +x /etc/init.d/clonemac and enabled ist like in the description. but it doesnt change my wan mac adress, and i cannot connect to the internet.
Under system Startup i see the script, but it is disabled and when i try to start by /etc/init.d/clonemac start it doesnt work.
Only when i copy the commands to terminal the wan mac adress is changed.
you may have an idea ?
thank you very much,
david