Setting up hostapd in Fedora 25/26

1

I am trying to setup a wireless access point on Fedora with Hostapd, because Hostapd has some extra features I need over the default hotspot functionality of the Gnome network manager.

I have added the following lines to /etc/NetworkManager/NetworkManager.conf, to make sure that the NetworkManager does not interfere with Hostapd.

[keyfile]
unmanaged-devices=interface-name:wl*

I have disabled the DNS-function from Dnsmasq, and set a range of DHCP addressess. My /etc/dnsmasq.conf looks like this:

port=0
interface=wlp3s0
dhcp-range=192.168.8.20,192.168.8.254,255.255.255.0,12h
server=8.8.8.8
server=8.8.4.4

In etc/sysctl.conf I added this line:

net.ip4.ip_forward=1

And then I have executed:

$ killall dnsmasq
$ iptables -t nat -A POSTROUTING -s 192.168.8.0/24 ! -d 192.168.8.0/24 -j MASQUERADE
$ service NetworkManager restart
$ service dnsmasq start
$ service hostapd start

The problem is that other devices won't receive an ip-address when trying to connect to the access point. I am not sure how and where to find the problem.

I am asking this question, because there seem to be some differences with older versions and other distributions. For example, I don't have wlan0 but wlp3s0 and the /etc/network/ folder does not exist in Fedora.


Okay, I had to enable DHPC with the firewall configuration, and now Dnsmasq keeps saying

dnsmasq-dhcp: DHCP packet received on wlp3s0 which has no address

And I have progressed one more step!

ifconfig wlp3s0 192.168.8.20/24 up

Now the devices can connect, but they don't have internet yet.

Yatoom

Posted 2017-09-09T16:00:23.950

Reputation: 11

No answers