3

I have configured Fedora for starting wireless network

First editing /etc/wpa/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

network={
    ssid="mysid"
    psk="mypassword"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    auth_alg=OPEN
}

Then I create this file

/etc/sysconfig/network-scripts/ifcfg-mysid

And I edit it..

ESSID="mysid"
MODE=Managed
KEY_MGMT=WPA-PSK
TYPE=Wireless
BOOTPROTO=static
IPADDR=192.168.0.6
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=mysid
UUID=abcde-...
ONBOOT=yes
HWADDR=**:**:**:**:**:**
MACADDR=**:**:**:**:**:**
SECURITYMODE=open
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

Work for first time... But on every reboot I see mac of wifi change. How to put a fixed macaddr for the device? My router accept only known MAC; if the MAC changes, it drops connection. NetworkManager were disabled

  • Are you using Networkmanager? – GAD3R Feb 14 '18 at 20:56
  • 2
    No,is disabled atm – elbarna Feb 14 '18 at 20:57
  • Writing a script which contain the command to change the mac address + wp_supplicant command to connect, then create a cron job to make the script work on boot time. – GAD3R Feb 14 '18 at 21:20
  • 1
    Is there a particular reason to disable NetworkManager? – mattdm Feb 14 '18 at 21:22
  • 1
    @mattdm Right, enabling the networkmanager can be used to solve the problem. How to stop MAC address from changing after disconnecting?. – GAD3R Feb 14 '18 at 21:31
1

I found a workaround

Enable NetworkManager

add

[device]
wifi.scan-rand-mac-address=no

to NetworkManager.conf

And run this script before boot

#!/bin/sh    
HWADDR=**:**:**:**:**
ifconfig wlp6s0 down 
macchanger --mac="$HWADDR" wlp6s0
ifup mynet

OR A better and easy solution using NetworkManager

add

[device]
wifi.scan-rand-mac-address=no

to NetworkManager.conf

Then run..

nmcli device wifi connect mysidname password "pass!"

Easy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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