Score:0

Linux Wifi Hotspot - Cant start DHCP: /etc/dhcp/dhcpd.conf: interface name too long

ru flag

I'm trying to setup a Wifi Hotspot on my Linux Machine. After failing to achieve it through the GUI app, linux-wifi-hotspot, I followed this guide, which was going smoothly until the last step of starting DHCP (so it can issue IPs for the Wifi clients).

My machine is connected to ethernet on interface enp5s0 and I would like to use wifi interface wlp6s0 to create a hotspot.

My /etc/dhcp/dhcpd.conf:

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
  interface wlp6s0;
  range 192.168.1.100 192.168.1.105;
  option routers 192.168.0.1;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.0.255;
}

My /etc/default/isc-dhcp-server:

INTERFACESv4="wlp6s0"
INTERFACESv6="wlp6s0"

My /etc/network/interfaces:

auto lo
iface lo inet loopback

iface enp5s0 inet static
    address 192.168.10.101
    netmask 255.255.255.0
    broadcast 192.168.10.255
    network 192.168.10.0
    gateway 192.168.10.254 
dns-nameservers 192.168.10.254

iface wlp6s0 inet dhcp

Running dhcpd -t /etc/dhcp/dhcpd.conf gives:

/etc/dhcp/dhcpd.conf: interface name too long (is 20)

isc-dhcp-server.service won't start. I see the hotspot but cannot connect to it.

I suspect my /etc/network/interfaces is wrong but I don't actually know what it should look like.

PS: I have also tried ifconfig wlp6s0 192.168.1.100

chili555 avatar
cn flag
"I suspect my /etc/network/interfaces is wrong" That method is deprecated since Ubuntu 17.10. Manual configuration is done in Netplan. Welcome to Ask Ubuntu.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.