LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-24-2022, 03:38 AM   #1
koloth
Member
 
Registered: Jun 2004
Location: Athens, Greece
Distribution: Slack@Home - RHEL@Work
Posts: 150

Rep: Reputation: 29
rpz entry for non existed domain goes unanswered


Hello,
I have A recursive DNS server running bind on Centos 8.5.
I've implemented a firewall based on RPZ, however i have ran into a weird issue.
The RPZ works fine and redirects the reply if the domain exists, however for non-existing domain the rpz does not reply.
Dig can show the difference:

Code:
$ dig WORKING_DOMAIN

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.9 <<>> rarbg.to
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39661
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;WORKING_DOMAIN.                      IN      A

;; ANSWER SECTION:
WORKING_DOMAIN.               5       IN      A       REDIRECT_IP

;; AUTHORITY SECTION:
MY_rpz.              10800   IN      NS      MY_RPZ.

;; ADDITIONAL SECTION:
MY_RPZ.              10800   IN      A       127.0.0.1
MY_RPZ.              10800   IN      AAAA    ::1

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 24 10:35:52 EET 2022
;; MSG SIZE  rcvd: 120

$ dig NOT_WORKING_DOMAIN 

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.9 <<>> iptv-premier.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51466
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;NOT_WORKING_DOMAIN.              IN      A

;; Query time: 26 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 24 10:36:05 EET 2022
;; MSG SIZE  rcvd: 45
Is it indeed an issue with the not working domain name being non-existent?

thanks in advance
 
Old 03-25-2022, 05:19 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
$ dig NOT_WORKING_DOMAIN

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.9 <<>> iptv-premier.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51466
<-snip->
Is it indeed an issue with the not working domain name being non-existent?
You don't get a NXDOMAIN but a SERVFAIL response.
Apparently you have some error(s) in your config file(s) since you get a SERVFAIL response.
Use the named-checkconf, named-checkzone utilities to check your setup. Also take a look at the relevant dns logs.

Regards

Last edited by bathory; 03-25-2022 at 05:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 10 Commercial Apps for Linux That I Never Knew Existed LXer Syndicated Linux News 0 05-25-2011 07:20 PM
LXer: Five Brilliant Ubuntu-based Distros You Never Knew Existed LXer Syndicated Linux News 1 02-11-2010 05:13 PM
Linux would be more popular in early America (had computers existed) newbiesforever General 11 10-03-2009 12:58 PM
Dual system boot err: rootnoverify(hd1,0),but the hd0 err msg existed befor shut down lilipeng24 Linux - General 3 06-25-2005 12:10 PM
If Windows Had Never Existed... Ken Ju-On General 47 01-04-2004 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration