Description
Let‘s assume you are running ONA (commit opennetadmin/ona@0ab7fd7 ) on an Apache2 server on port 8666 and this is again proxied via another apache server 1 with the configuration:
<Location /ona>
RequestHeader unset Accept-Encoding
ProxyPreserveHost on
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|http://server.example.org/ona|https://server.example.org/ona|ni"
ProxyPassReverse /
</Location>
ProxyPass /ona http://127.0.0.1:8666/ona/
ProxyPassReverse /ona http://127.0.0.1:8666/ona/
ProxyRequests Off
And dcm.pl
is configured to use:
url => https://server.example.org/ona/dcm.php
Afterwards, the script build_bind
at commit 5924d5c is run which builds a bind9 /opt/ona/etc/bind/zone_data/named-sub.example.org
zone file, then the file named-sub.example.org
is truncated after 76 lines. Of course you need at least 66 entries (first 10 lines are zone file header) for sub.example.org, so that you can see that the file is truncated. The 76 lines of the file are completely correct, just the rest is missing.
This error does not affect reverse lookup files, i.e. named-*.ip6.arpa
or named-*.in-addr.arpa
files; they are complete and can exceed 76 lines.
I have no idea why exactly 76 lines, but the number seems to be constant and not changing.
When I remove the proxy, i.e. configure dcm.pl
to use:
url => http://127.0.0.1:8666/ona/dcm.php
then named-sub.example.org
is complete and does exceed 76 lines, so the problem arises really by using the proxy. I did not observe any other problems with the proxy.
When you read until this point and think, this cannot be and is wired behavior, especially the 76 lines, then I agree. But I had this problem already ~2 years ago, forgot it meanwhile, and configured now a server again with a proxy and the same problem occurs, so I can reproduce it on a second machine.
By the way, The apache proxy is just nice, I have no issues to run build_bind directly on http://127.0.0.1:8666/ona/ , just want to document the problem here.
1: When you wonder whey I am doing this, the first Apache server is running in a docker container.