On 2023-05-01 15:30, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-04-26 08:45, Per Jessen wrote:
Carlos E. R. wrote:
(Can I write comments in xml file /etc/firewalld/zones/external.xml?)
Yes, use "<!-- comment -->". Can span multiple lines.
We went over this, but it is even worse:
Telcontar:/etc/firewalld # firewall-cmd --check-config Error: INVALID_ZONE: 'external.xml': not a valid zone file: mismatched tag: line 176, column 4
At first glance, that seems to be a bug - even if that config file is not intended as a user interface. Adding a comment is perfectly valid XML.
Second glance - with the virtually empty config, I added a comment and "--check-config" reported "success".
You could try feeding the XML to a validator - or use "xmllint" if you have that installed.
https://www.w3schools.com/xml/xml_validator.asp
xmllint your.xml.file
It just prints my file back. Oh, now the comment works. Go figure. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)