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

AppImage or Flatpak Distribution #231

Open
ShrirajHegde opened this issue Mar 8, 2022 · 11 comments
Open

AppImage or Flatpak Distribution #231

ShrirajHegde opened this issue Mar 8, 2022 · 11 comments

Comments

@ShrirajHegde
Copy link
Contributor

Is your feature request related to a problem? Please describe.
linux-wifi-hotspot Does not work on Fedora 34/35

Describe the solution you'd like
Appimage / Flatpak distribution (preferrably appimage since it's standalone)

Describe alternatives you've considered
Troubleshooting and different config options

Additional context
On fedora 35, hotspot creation works, but DHCP doesn't work. Same laptop with ubuntu, LWH works fine

@lakinduakash
Copy link
Owner

Can you please send the logs by executing the tool in the command line? So we can identify why doesn't it work. AppImage/Flatpak won't fix the issue.

@ShrirajHegde
Copy link
Contributor Author

Excluding GTK warnings,

pkexec --user root create_ap wlo1 wlo1 'test' '12345678' --mkconfig /etc/create_ap.conf --freq-band 2.4 
Config options written to '/etc/create_ap.conf'

contents of /etc/create_ap.conf:

❯ cat '/etc/create_ap.conf'
CHANNEL=default
GATEWAY=192.168.12.1
WPA_VERSION=2
ETC_HOSTS=0
DHCP_DNS=gateway
NO_DNS=0
NO_DNSMASQ=0
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
DAEMON_PIDFILE=
DAEMON_LOGFILE=/dev/null
NO_HAVEGED=0
WIFI_IFACE=wlo1
INTERNET_IFACE=wlo1
SSID=test
PASSPHRASE=12345678
USE_PSK=0

This successfully creates a hotspot which is visible on my phone. But DHCP doesn't seem to work.

image

I have tried setting static IP on phone, getting IP and gateway from ip addr | grep inet
and selecting inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 and setting something in 192.168.122.x as static IP for phone connects, but no internet.

@ShrirajHegde
Copy link
Contributor Author

Log from create_ap

❯ sudo create_ap wlo1 wlo1 'test' '12345678'  
Config dir: /tmp/create_ap.wlo1.conf.k1Nl5cEY
PID: 37422
Network Manager found, set ap0 as unmanaged device... DONE
wlo1 is already associated with channel 11 (2462 MHz)
multiple channels supported
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlo1.conf.k1Nl5cEY/hostapd_ctrl
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED 
ap0: STA 2a:92:27:c5:39:b8 IEEE 802.11: authenticated
ap0: STA 2a:92:27:c5:39:b8 IEEE 802.11: associated (aid 1)
ap0: AP-STA-CONNECTED 2a:92:27:c5:39:b8
ap0: STA 2a:92:27:c5:39:b8 RADIUS: starting accounting session 5CDBCB5FA4951FF6
ap0: STA 2a:92:27:c5:39:b8 WPA: pairwise key handshake completed (RSN)
ap0: EAPOL-4WAY-HS-COMPLETED 2a:92:27:c5:39:b8
ap0: AP-STA-DISCONNECTED 2a:92:27:c5:39:b8
ap0: STA 2a:92:27:c5:39:b8 IEEE 802.11: authenticated
ap0: STA 2a:92:27:c5:39:b8 IEEE 802.11: associated (aid 1)
ap0: AP-STA-CONNECTED 2a:92:27:c5:39:b8
ap0: STA 2a:92:27:c5:39:b8 RADIUS: starting accounting session C2AE8C51C2F0493F
ap0: STA 2a:92:27:c5:39:b8 WPA: pairwise key handshake completed (RSN)
ap0: EAPOL-4WAY-HS-COMPLETED 2a:92:27:c5:39:b8

@ShrirajHegde
Copy link
Contributor Author

@lakinduakash Are there any testers/people who have confirmed it to be working on Fedora? since README has compile instructions for fedora.

Still stuck with the same problem while it works fine on ubuntu

@Luciogi
Copy link
Contributor

Luciogi commented Apr 6, 2022

You are also facing firewalld problem, I guess ,#209 (comment)

@ShrirajHegde
Copy link
Contributor Author

@Luciogi Thank you very much ! That was the problem. I stopped firewalld service temporarily, and it worked like a charm.

@ShrirajHegde
Copy link
Contributor Author

@Luciogi is there anyway that linux-wifi-hotspot could handle the rules described in #166 internally?

@Luciogi
Copy link
Contributor

Luciogi commented Apr 8, 2022

@ShrirajHegde At the time, no
Edit: There are many firewall applications, it may not worth to add functionality for all. Firewall users should configure firewall applications

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Oct 26, 2022

Although the problem that caused the user to want this has been remediated, I believe that evaluating whether the proposed packaging methods are useful is sensible, not leastly because this software is not available for me via dnf, despite having added rpmfusion.

(Have you considered a copr repository?)

@ShrirajHegde
Copy link
Contributor Author

Edit: There are many firewall applications, it may not worth to add functionality for all. Firewall users should configure firewall applications

How about running these commands once during installation?

sudo firewall-cmd --zone=FedoraWorkstation --add-masquerade
sudo firewall-cmd --zone=trusted --add-masquerade
sudo firewall-cmd --zone=trusted --add-interface=ap0

@ShrirajHegde
Copy link
Contributor Author

Something like this, in a single shell.

if grep -qi fedora /etc/os-release  || which firewall-cmd >/dev/null 2>&1 ; then

sudo firewall-cmd --zone=FedoraWorkstation --add-masquerade
sudo firewall-cmd --zone=trusted --add-masquerade
sudo firewall-cmd --zone=trusted --add-interface=ap0

fi

Or at least warn users.

If you can put the COPR repo in the README, I am ready to make and maintain it. It would solve all these problems.

@ShrirajHegde ShrirajHegde reopened this Nov 9, 2022
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

4 participants