Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1438668

Summary: DNS forwarder address added during IPA installation shouldn't add IP-Address '0.0.0.0'
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: python-netaddrAssignee: Petr Vobornik <pvoborni>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: akasurde, ksiddiqu, myusuf, pvoborni, rcritten, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-netaddr-0.7.5-9.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 17:56:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sudhir Menon 2017-04-04 06:26:46 UTC
Description of problem: DNS forwarder address added during installation shouldn't add IP-Address 0.0.0.0

Version-Release number of selected component (if applicable):
ipa-server-4.5.0-4.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install IPA-server with integrated DNS
2. On the below steps enter the forwarder IP-address as 0.0.0.0

Do you want to configure these servers as DNS forwarders? [yes]: 
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 0.0.0.0

3. On the below steps enter the forwarder IP-address 255.255.255.255
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 255.255.255.255

Actual results:

2. Enter an IP address for a DNS forwarder, or press Enter to skip: 0.0.0.0
DNS forwarder 0.0.0.0 added. You may add another.
Enter an IP address for a DNS forwarder, or press Enter to skip: 
Checking DNS forwarders, please wait ...
ipa         : ERROR    DNS server 0.0.0.0: query '. SOA': The DNS operation timed out after 10.0005121231 seconds
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    DNS server 0.0.0.0: query '. SOA': The DNS operation timed out after 10.0005121231 seconds
ipa.ipapython.install.cli.install_tool(CompatServerMasterInstall): ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information

3. Do you want to configure these servers as DNS forwarders? [yes]: 
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 255.255.255.255
Error: Invalid IP Address 255.255.255.255: cannot use IANA reserved IP address 255.255.255.255 <====
DNS forwarder 255.255.255.255 not added.

Expected results:
We can see that 255.255.255.255 is not allowed as a valid DNS forwarder address, in the similar case 0.0.0.0 shouldn't be allowed as well because 0.0.0.0 will never be used as forwarder address.

Although the step of DNS quering for 0.0.0.0 is correct since its been added, it shouldn't be allowed to be added in the first place and should be rejected with invalid error message.

Additional info:

Comment 2 Abhijeet Kasurde 2017-04-04 13:01:18 UTC
This is missing in IPA required netaddr RPM - https://github.com/drkjam/netaddr/blob/rel-0.7.x/netaddr/ip/__init__.py#L1876

Comment 3 Florence Blanc-Renaud 2017-04-04 14:36:53 UTC
With RHEL 7.4, the installed version of python-netaddr is
python-netaddr.noarch             0.7.5-7.el7

If this package is updated through pip, the issue does not happen any more:
# Install EPEL
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ yum install ./epel-release-latest-7.noarch.rpm

# Install python-pip
$ yum install python-pip python-wheel

# Upgrade netaddr
$ pip install --upgrade netaddr
$ pip show netaddr
Name: netaddr
Version: 0.7.19

# Install ipa-server and try to configure 0.0.0.0 as forwarder
$ ipa-server-install
[...]
Checking DNS domain example.com., please wait ...
Do you want to configure DNS forwarders? [yes]: 
Following DNS servers are configured in /etc/resolv.conf: x.x.x.x, y.y.y.y
Do you want to configure these servers as DNS forwarders? [yes]: 
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 0.0.0.0
Error: Invalid IP Address 0.0.0.0: cannot use IANA reserved IP address 0.0.0.0
DNS forwarder 0.0.0.0 not added.
Enter an IP address for a DNS forwarder, or press Enter to skip: 
[...]


This is a duplicate of python-netaddr issue 71:
 https://github.com/drkjam/netaddr/issues/71
and the issue was fixed in netaddr-0.7.16

Comment 4 Petr Vobornik 2017-04-13 16:21:45 UTC
Per comments 2 and 3, moving to python-netaddr.

Comment 6 Jan Cholasta 2017-04-25 07:09:35 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/6894

Comment 7 Martin Bašti 2017-04-26 10:36:51 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/0784e53f7f8a323acafbbff26a9d1c0276a229b0

Comment 8 Martin Bašti 2017-05-11 14:58:33 UTC
Fixed upstream
ipa-4-5:
https://pagure.io/freeipa/c/ecccd6cb843c44093449cc45a7d94bb14fa65513

Comment 14 Mohammad Rizwan 2018-01-10 07:17:33 UTC
version:
ipa-server-4.5.4-7.el7.x86_64
python-netaddr-0.7.5-9.el7.noarch

Steps:

1. Install IPA-server with integrated DNS
2. On the below steps enter the forwarder IP-address as 0.0.0.0

Do you want to configure these servers as DNS forwarders? [yes]: 
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 0.0.0.0

3. On the below steps enter the forwarder IP-address 255.255.255.255
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 255.255.255.255


Actual result:

[root@master ~]# ipa-server-install
[..]
Checking DNS domain testrelm.test., please wait ...
Do you want to configure DNS forwarders? [yes]: yes
Following DNS servers are configured in /etc/resolv.conf: 10.16.36.29, 10.11.5.19, 10.5.30.160
Do you want to configure these servers as DNS forwarders? [yes]: 
All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now:
Enter an IP address for a DNS forwarder, or press Enter to skip: 0.0.0.0
Error: Invalid IP Address 0.0.0.0: cannot use IANA reserved IP address 0.0.0.0
DNS forwarder 0.0.0.0 not added.
Enter an IP address for a DNS forwarder, or press Enter to skip: 255.255.255.255
Error: Invalid IP Address 255.255.255.255: cannot use IANA reserved IP address 255.255.255.255
DNS forwarder 255.255.255.255 not added.
Enter an IP address for a DNS forwarder, or press Enter to skip: 
Checking DNS forwarders, please wait ...
[..]


Based on above observation, marking bug as verified.

Comment 19 errata-xmlrpc 2018-04-10 17:56:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0957