firewall-cmd - rich-rule - permanent configuration
by poma
Hi,
# firewall-cmd --version
0.3.3
<Runtime Configuration>
# firewall-cmd --list-rich-rules
# firewall-cmd --add-rich-rule='rule forward-port port="2222"
to-port="22" to-addr="192.168.100.2" protocol="tcp" family="ipv4" source
address="192.168.2.100"'
# firewall-cmd --list-rich-rules
rule family="ipv4" source address="192.168.2.100" forward-port
port="2222" protocol="tcp" to-port="22" to-addr="192.168.100.2"
# firewall-cmd --remove-rich-rule='rule forward-port port="2222"
to-port="22" to-addr="192.168.100.2" protocol="tcp" family="ipv4" source
address="192.168.2.100"'
# firewall-cmd --list-rich-rules
# firewall-cmd --add-rich-rule='rule forward-port port="2222"
to-port="22" to-addr="192.168.100.2" protocol="tcp" family="ipv4" source
address="192.168.2.100"'
# firewall-cmd --list-rich-rules
rule family="ipv4" source address="192.168.2.100" forward-port
port="2222" protocol="tcp" to-port="22" to-addr="192.168.100.2"
# firewall-cmd --reload
# firewall-cmd --list-rich-rules
<\Runtime Configuration>
Runtime Configuration - OK.
<Permanent Configuration>
# firewall-cmd --list-rich-rules
# firewall-cmd --permanent --add-rich-rule='rule forward-port
port="2222" to-port="22" to-addr="192.168.100.2" protocol="tcp"
family="ipv4" source address="192.168.2.100"'
# firewall-cmd --list-rich-rules
# firewall-cmd --reload
# firewall-cmd --list-rich-rules
rule family="ipv4" source address="192.168.2.100" forward-port
port="2222" protocol="tcp" to-port="22" to-addr="192.168.100.2"
# firewall-cmd --permanent --remove-rich-rule='rule forward-port
port="2222" to-port="22" to-addr="192.168.100.2" protocol="tcp"
family="ipv4" source address="192.168.2.100"'
# firewall-cmd --list-rich-rules
rule family="ipv4" source address="192.168.2.100" forward-port
port="2222" protocol="tcp" to-port="22" to-addr="192.168.100.2"
# firewall-cmd --reload
# firewall-cmd --list-rich-rules
rule family="ipv4" source address="192.168.2.100" forward-port
port="2222" protocol="tcp" to-port="22" to-addr="192.168.100.2"
# /etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
…
<rule family="ipv4">
<source address="192.168.2.100"/>
<forward-port to-addr="192.168.100.2" to-port="22" protocol="tcp"
port="2222"/>
</rule>
</zone>
# Oops! It's still here. :)
<\Permanent Configuration>
Permanent Configuration - Is it a bug or a feature?
poma
10 years, 4 months
D-BUS documentation, where it is?
by Víctor R. Escobar
Hello everybody,
I am getting started with firewalld and I've read most of the
documententation which was user oriented.
Right now I am looking for the D-BUS interface and somewhere some kind of
API documentation or other online resource about how to deal with the
firewall via D-BUS.
Could someone tell me how to find it? I've really googled for it and had no
results.
Additionally "man 5 firewalld.dbus" isn't avialable on my local fedora,
either on several internet pages which have broken links :(
Example of broken link:
http://linuxmanpages.net/manpages/fedora19/man5/firewalld.dbus.5.html
Thank you in advance!
Víctor R. Escobar
10 years, 8 months