Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Centos 8) SELinux preventing pdns_server from name_bind access on the udp_socket port (random high port) #93

Open
ghost opened this issue Dec 3, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 3, 2020

  • Program: Authoritative, pdns-ansible
  • Issue type: Bug report

Short description

SELinux (permissive) complains that if enforcing it would not allow pdns_server to bind to the random high v4/v6 UDP query/notify sockets.

Environment

  • Operating system: Centos 8 Stream
  • Software version: pdns: pdns-4.3.1-1.el8, pdns-ansible: f0ac78c
  • Software source: EPEL (pdns), github (pdns-ansible)

Steps to reproduce

  1. use pdns-ansible to install pdns on CentOS 8
  2. Selinux targeted/permissive or enforcing
  3. Start pdns service

Expected behaviour

No SELinux complaints in journal

Actual behaviour

message in systemd journal:

SELinux is preventing /usr/sbin/pdns_server from name_bind access on the udp_socket port 12023

Other information

UPDATE: tracing the ansible run, .../tasks/selinux.yml is called and the 'allow pdns to bind to udp high ports' seport task is run but it seems not to have the desired effect.

From freenode/#selinux, a working solution seems to be something to the effect of:

echo '(allow pdns_t unreserved_port_type (udp_socket (name_bind)))' > mypdnsfix.cil && sudo semodule -i mypdnsfix.cil

I'm not sure how to refine that to limit the range to 10000-20000 as listed in selinux.yml

My Ansible-fu is not sufficiently strong to submit a PR at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants