Comments (4)
firewall-cmd is only returning "Success" if the command succeeded. Here are some examples:
# firewall-cmd --permanent --zone=trusted --add-source=1.2.3.4
success
# firewall-cmd --permanent --zone=trusted --add-source=1.2.3.4
Warning: ALREADY_ENABLED: 1.2.3.4
# firewall-cmd --permanent --zone=trusted --remove-source=1.2.3.4
success
# firewall-cmd --permanent --zone=trusted --remove-source=1.2.3.4
Warning: NOT_ENABLED: 1.2.3.4
I just noticed that the return value is not correct in the warning case. I will fix this.
from firewalld.
Thanks for the quick response! What version was this functionality added?
[root@localhost vagrant]# /bin/firewall-cmd --permanent --zone=trusted --add-source=8.8.8.8
success
[root@localhost vagrant]# /bin/firewall-cmd --permanent --zone=trusted --add-source=8.8.8.8
success
[root@localhost vagrant]# /bin/firewall-cmd --version
0.3.9
I'm using 0.3.9 which was stock from Centos7 which doesn't seem to have the same behaviour.
from firewalld.
That has been added with 0.3.12.
from firewalld.
You will get this with the rebase to 0.4.3.
from firewalld.
Related Issues (20)
- Firewalld only assigns interface zone in NetworkManager in the CLI script HOT 3
- Deprecate and Drop Lockdown Feature
- Various test suite failure on Debian sid HOT 5
- Firewalld is blocking Network/Samba Client in KDE/Dolphin HOT 4
- Firewalld 2.0: Error from removeSource Call HOT 9
- Doc: Include better explainations of the effects various configurations (i.e. what does the setting do?)
- ipset: config checks should verify that the number of elements does not exceed ipset size
- firewall-config doesn't show policy objects
- Render, but don't apply, rules - for debugging
- In rocky8, I have a question about firewall. Can't iptables command see firewall rules? HOT 4
- Preserve source IP when using masquerade + rich-rule port-forwading
- Policy and IPv6 HOT 3
- Add port forwarding to firewalld doesn't take effect actually HOT 3
- Applet icon missing in the tray but randomly appears after relog HOT 3
- Add SCTP for DLM
- --runtime-to-permanent removing public zone from active zones HOT 2
- Should `https.xml` include `http3.xml`? HOT 1
- Bug in `wrong_args_for_callable()` causes firewall-applet to crash (regression introduced in 2.1.0) HOT 1
- rework D-Bus bindings and move away from deprecated python-dbus
- Disruptive remnants of firewalld.service remain after removal HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firewalld.