-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
firewalld support #166
Comments
what should |
@tubbadu check the ui dropdowns |
Edit : This solution is NOT working, GOTOJust add adapter name in variables( export wifi_iface=
export internet_iface= sudo firewall-cmd --add-service=dhcp
sudo firewall-cmd --add-service=dns
sudo firewall-cmd --add-masquerade
sudo firewall-cmd -q --direct --add-rule ipv4 nat POSTROUTING 0 -o $wifi_iface -j MASQUERADE
sudo firewall-cmd -q --direct --add-rule ipv4 filter FORWARD 0 -i $internet_iface -o $wifi_iface -j ACCEPT
sudo firewall-cmd -q --direct --add-rule ipv4 filter FORWARD 0 -i $wifi_iface -o $internet_iface -m state --state RELATED,ESTABLISHED -j ACCEPT |
@Luciogi Thanks I'll add those and test them soon. |
@lakinduakash this solution is not working |
Working Solution:I am using Fedora 35 for testing, firewalld has default zone sudo firewall-cmd --zone=FedoraWorkstation --add-masquerade
sudo firewall-cmd --zone=trusted --add-masquerade
sudo firewall-cmd --zone=trusted --add-interface=ap0 Edit: Please test it and give feedback
|
Thanks @Luciogi for testing it. Please test someone, currently I don't have a Fedora environment. |
This will allow clients to connect and have internet access (tested on Ubuntu 22.04 with firewalld 1.1.1) without allowing them access to other services on the host:
These rules will persist after a reboot, so you shouldn't need to touch them again unless you want to allow more zones to be used for internet. |
Sadly, this doesn't work somehow… Are there some special settings which I missed? I got an IP address with my phone, but no internet connection. IP of Phone: 192.168.12.13 I have a virtual interface as LAN device, but this shouldn't generate any problems, right? Ethernet port Normally this would be 192.168.3.3 with Gateway 192.168.3.1 Greets LxWulf Edit: Yes, I use Fedora 37 with the newest updates. |
@lxwulf Are you using Fedora 37 on VM? |
@Luciogi Yes, exactly! It does work with a LAN PCI pass through, but not with virtual devices, at least on my side. |
@lxwulf I guess, VM can't directly access all wifi card capabilites , It uses bridge or NAT connection coming from Host OS |
@Luciogi Yes, worth trying, but at moment have no USB dongle, but I'll keep this in mind for later. |
I'm on Fedora37, and with these settings my android device is "connected without internet access" |
@tubbadu Please test this #166 (comment) |
We need proper support for firewalld. Something nice like @NHellFire script translating existing regular iptables rules. For fast and easy way already discussed here, that is masquerade+add ap0 to zones |
On Debian 12 with firewalld enabled, the problem was fixed by only the first three lines. Namely:
But yes, given that If nothing else, just check if EDIT: Even though I could not connect to the network, I could not use mDNS to resolve the hostname. I ended up disabling firewalld, and expect to be using something that is not as obstructive in the future. |
this works for me on fedora 39 |
is there a way to make this permanent? |
No idea, I am not using firewalld and fedora anymore, I forgot whether these commands make permanent rules |
I use Fedora Linux since version 30, and now I'm on version 39. I can confirm that the All changes without the |
The following commands are needed to allow traffic when firewalld is being used.
The text was updated successfully, but these errors were encountered: