[Pdns-users] yaml format with allow_from_file
Otto Moerbeek
otto at drijf.net
Sun Jan 5 08:44:22 UTC 2025
On Sun, Jan 05, 2025 at 08:26:51AM +0000, Ronny Wagner via Pdns-users wrote:
> Good morning,
>
> I am currently converting pdns-recursor 5.1.3 from conf to yml and now have a problem understanding the content of the allow_from_file function.
>
> Old Format:
> 127.0.0.0/8
> ::1/128
> fe80::/10
> single_IPV4
> single_IPV6
>
> New Format:
> - 127.0.0.0/8
> - ::1/128
> - fe80::/10
> - single_IPV4
> - single_IPV6
>
> Output from rec_control show-yaml:
> # Converted /etc/powerdns/allow_ip_nets to YAML format for incoming.allow_from_file:
> - '- 127.0.0.0/8'
> - '- ::1/128'
> - '- fe80::/10'
> - '- single_IPV4'
> - '- single_IPV6'
This is a case of double conversion. You probably already converted the file,
and show_yaml (which is smart in some cases, but not in all) converted it again.
The format should be like
https://docs.powerdns.com/recursor/yamlsettings.html#incoming-allow-from-file,
so a single dash on each line.
-Otto
> # Validation result: allow_from_file: value `- 127.0.0.0/8' is not a subnet or IP
> # End of converted /etc/powerdns/allow_ip_nets
>
> Why is the IP network 127.0.0.0/8 not recognized correctly? Where did I make my mistake?
>
> Thank you very much for help.
>
> Mit freundlichen Grüßen/Best Regards
> Ronny
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
More information about the Pdns-users
mailing list