13

wifi hotspot is created easily and is visible to other devices too. but on the other hand after typing password to connect it just do nothing. can't able to connect my ubuntu 22.04 created hotspot can anyone help me with this ? By default hotspot configuration is WEP security which also can't be modified using nm-connection-editor. i have already tried this.

Krishna
  • 339

8 Answers8

14

BE CAREFUL WITH THE FIREWALL

First try:

sudo ufw disable

If that solves the problem, you can do:

sudo ufw enable
sudo ufw       allow in  on wlo1
sudo ufw route allow out on enp41s0

My system works with:

$ sudo ufw status numbered
[ 1] Anywhere on wlo1           ALLOW IN    Anywhere
[ 2] Anywhere on enp41s0        ALLOW FWD   Anywhere       (out)
[ 3] Anywhere (v6) on wlo1      ALLOW IN    Anywhere (v6)
[ 4] Anywhere (v6) on enp41s0   ALLOW FWD   Anywhere (v6)  (out)

Only [ 1] and [ 2] are strictly necessary.

#----------------------------------------------------- On my system:

With WiFi on:

ifconfig

> enp41s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > inet 192.168.2.115 netmask 255.255.255.0 broadcast 192.168.2.255 > inet6 fe80::19b0:6542:ee4:5982 prefixlen 64 scopeid 0x20<link> > ether 00:d8:61:9e:2b:52 txqueuelen 1000 (Ethernet) > RX packets 46282 bytes 39478576 (39.4 MB) > RX errors 0 dropped 4 overruns 0 frame 0 > TX packets 38257 bytes 7380268 (7.3 MB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > enp42s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 > ether 00:d8:61:9e:2b:53 txqueuelen 1000 (Ethernet) > RX packets 0 bytes 0 (0.0 B) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 0 bytes 0 (0.0 B) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 > inet 127.0.0.1 netmask 255.0.0.0 > inet6 ::1 prefixlen 128 scopeid 0x10<host> > loop txqueuelen 1000 (Local Loopback) > RX packets 1981 bytes 318831 (318.8 KB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 1981 bytes 318831 (318.8 KB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > inet 192.168.2.115 netmask 255.255.255.0 broadcast 192.168.2.255 > inet6 fe80::1c39:c0d6:43bd:fcf0 prefixlen 64 scopeid 0x20<link> > ether 38:00:25:95:18:02 txqueuelen 1000 (Ethernet) > RX packets 50 bytes 17772 (17.7 KB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 48 bytes 7067 (7.0 KB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

This means that the WiFi hotspot: input is from wlo1 Output is to enp42s0

Edit (June 03, 2023):

For those who haven't yet figured out how to identify the input and output, here is the right way: ufw stores its logs in this location: /var/log/ufw.log

So you can enable the firewall and start monitoring updates from ufw using this command in a new terminal:

tail -f /var/log/ufw.log

Now when you connect to hotspot and attempt to view some webpage, and if the request gets blocked by ufw, you will find a line like this in the terminal (sample line from my system):

Jun 3 09:44:04: [UFW BLOCK] IN=wlo1 OUT=ppp0 MAC=ac:12:03:69:63:6a:16:5...

This indicates that the IN is wlo1 and OUT is ppp0. You should be able to use the method above to whitelist this path and the hotspot will start working as expected.

13

This is the only solution worked with me, by downgrading wpa_supplicant-2.10 to wpa_supplicant-2.9:

Step 1: Add the required repository for downgrading

sudo nano /etc/apt/sources.list

Add the following “old-releases” repository to the end of the file.

deb http://old-releases.ubuntu.com/ubuntu/ impish main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ impish-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ impish-security main restricted universe multiverse

And don’t forget to save it.

Step 2: Downgrade wpa_supplicant

sudo apt update
sudo apt --allow-downgrades install wpasupplicant=2:2.9.0-21build1

Then use the Network-Manager UI to create new HOTSPOT

source

GNassro
  • 251
3

I've the same problem.
If it's any use, I got it working but without security.

Turn off the wifi, via the drop down top menu. Then go to:
Show Applications --> Advanced Network

Then in "Network Connections" dialog:

  1. Remove the Hotspot connection
  2. Add a new one (+ sign)
  3. choose WIFI for type of connection
  4. Name it and give it a SSID
  5. Change MODE to Hotspot
  6. Save Then restart the wifi via the top menu, and try to connect with your phone.

I didn't mess much with a passwords as I don't need them.

FarmerG
  • 31
3

A better solution than downgrading can be found here. Apparently, Protected Management Frames have to be disabled.

  • Create the file /etc/NetworkManager/conf.d/99-my.conf with content:
    [connection]
    wifi-sec.pmf=1
    
  • Restart NetworkManager:
    sudo systemctl restart NetworkManager
    
Thomas W.
  • 540
0

I needed both the answers from GNassro and Mario Galinda to get a working workaround. So you need to configure the firewall AND you need to downgrade the wpasupplicant package. If I do only the firewall thing, the connection still drops after a while.

Maarten
  • 764
0

I tried all the mentioned solutions, but none of them worked with security.

But as mentioned by Farmer-G, I was able to get it working without security. So I tried changing the security from there, to my surprise it worked with WEP security. If you don't have it working with this, try changing the security method, you may have others security types that work.

0

In my case, I had configures trough "nm-connection-editor" that when connecting to the particular Wi-Fi hotspot it would connect to VPN automatically. For some reason after updating from 20.04 to 22.04 imported VPN profiles did not work and resulted with Wi-Fi automatically disconnecting with "Connection failed" message. After reimporting .ovpn profile it worked all the same.

Artiom
  • 21
-1

Seems there are issues with firewall.

For me it's worked:

  1. Turn off wifi.

  2. Be sure that firewall disabled.

     $ sudo ufw enable
     $ sudo ufw disable
    
  3. Turn on wifi and hotspot.