Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No IP Allocated Error #209

Closed
incrypto32 opened this issue Nov 8, 2021 · 11 comments
Closed

No IP Allocated Error #209

incrypto32 opened this issue Nov 8, 2021 · 11 comments

Comments

@incrypto32
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a wifi hostpot
  2. Connect from another device to the hotspot

Expected behavior
Expected to get connected

Screenshots
photo_2021-11-08_10-11-17

Desktop (please complete the following information):

  • OS: Manjaro

Additional context
Seems like an issue with my laptop only. Works fine when I checked from another system

@lakinduakash
Copy link
Owner

This is strange. Can you run the wihotspot command in terminal and post the output. Also try connecting another device and check whether working (ip get assigned). DHCP must work fine.

@incrypto32
Copy link
Author

incrypto32 commented Nov 8, 2021

Here @lakinduakash here is the screenshot
2021-11-08_11-50

@incrypto32
Copy link
Author

@lakinduakash I also tried from another phone and it didn't work too Same issue.

@lakinduakash
Copy link
Owner

I can suggest as a temporary fix, assigning an IP to the device from the network setting. I think your DHCP server not working properly. This is the first time this issue came up.

@arimgibson
Copy link

arimgibson commented Feb 27, 2022

Potential fix in new comment below

I'm experiencing the same issue, Fedora 35 built from source at 04dae50. Currently troubleshooting and will edit this post as I learn some new information. So far, I'm getting errors running create_ap but the GUI will start just fine and let me connect via static IP as you suggested. I don't have internet when connecting with static IP, but I think that's my fault for assigning the wrong IP.

Edit 1: Here are some logs. It looks like it used NAT, which I'm not sure if that's the default behavior. Not a networking pro haha. Because of that, I checked for dnsmasq and iptables, both installed.
[ari@ari-laptop ~]$ sudo create_ap wlp2s0 wlp2s0 accesspnt ariariari --freq-band 2.4 Config dir: /tmp/create_ap.wlp2s0.conf.MRtRTTqD PID: 6139 Network Manager found, set ap0 as unmanaged device... DONE Custom frequency band set with 2.4Mhz with channel 1 Creating a virtual WiFi interface... ap0 created. Sharing Internet using method: nat hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp2s0.conf.MRtRTTqD/hostapd_ctrl ap0: interface state UNINITIALIZED->ENABLED ap0: AP-ENABLED ap0: STA 52:7f:4a:aa:c7:ff IEEE 802.11: authenticated ap0: STA 52:7f:4a:aa:c7:ff IEEE 802.11: associated (aid 1) ap0: AP-STA-CONNECTED 52:7f:4a:aa:c7:ff ap0: STA 52:7f:4a:aa:c7:ff RADIUS: starting accounting session 2CCF21460F920469 ap0: STA 52:7f:4a:aa:c7:ff WPA: pairwise key handshake completed (RSN) ap0: EAPOL-4WAY-HS-COMPLETED 52:7f:4a:aa:c7:ff ap0: AP-STA-DISCONNECTED 52:7f:4a:aa:c7:ff

@arimgibson
Copy link

Okay, I might have your fix @incrypto32! At least this worked for me, and I have no clue why. A simple removal (or purge, depending on your package manager) of dnsmasq and iptables did it for me. I'm wondering if by chance our OS's ship with a version of those two software that is initialized with some config that just doesn't work for linux-wifi-hotspot. I don't think I had any software that would've installed those otherwise; just the built-in wifi hotspot feature in my Fedora. Anyways, good luck!

@lakinduakash
Copy link
Owner

Thanks for helping troubleshoot. Even I had no way to reproduce it

@Luciogi
Copy link
Contributor

Luciogi commented Mar 27, 2022

@arimgibson Thanks for Fix
On Fedora 35, removal of iptables-nft(It removed packages related to firewalld) fixes ip issue, also Allow internet access to connected devices
Edit: @lakinduakash Firewalld is causing whole problem , simply disabling it fixes problem, I don't know how to allow connections for wihotspot in firewalld
For adding firewall rules instructions are available at #166

@huzhifeng
Copy link

I also encountered the problem of not able to get IP address on Fedora 36, it's caused by firewall-cmd.
My solution: sudo firewall-cmd --zone=FedoraWorkstation --add-port=67/udp

@VenomousSteam81
Copy link

VenomousSteam81 commented May 14, 2023

Same. But I took @huzhifeng command and modified it to be sudo firewall-cmd --permanent --zone=public --add-port=67/udp.
Edit: Make sure to run sudo firewall-cmd --reload after running either mine or huzhifeng's command

@laur89
Copy link

laur89 commented Jun 23, 2023

If you don't have any other service listening on some ports, then switching the firewalld off for the hotspot duration may also be an option:
sudo systemctl stop firewalld assuming you're using systemd. Or can also brute force by sudo killall firewalld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants