Bassically, I'm trying to revive this question that got no correct answer: reverse DNS (bind) for single ip/machine on non-private network
So, I am trying to configure my own public DNS server for multiple websites hosting purposes.
My situation: I have a Contabo server VPS[Ubuntu 20.04, Bind9](which on I can manage my own rDNS records by myself for my VPS's IP address) and I'm on the stage where I want to configure the reverse dns for my ip, let's take 31.123.23.121
and myhosting_domain.com
(which has ns1-2 nameservers
) as my domain.
I have set on the Hoster Control Panel the domain name where I want my IP to point to(31.123.23.121 -> server.myhostingdomain.com), all that is remaining is set a proper reverse zone file(for bind9).
I fallowed this tutorial so far(-> https://tecadmin.net/configure-dns-server-on-ubuntu-linuxmint/), but I don't know how to convert the Reverse Zone File shown there to my case... .
Thank you very much!
(I'm still practicing, so expect newbie questions)
ALSO: What I have tried is the configuration zone provided in the second answer of the question I mention, but obviously got errors:
$ORIGIN 121.23.123.31.in-addr.arpa.
$TTL 86400
@ IN SOA ns1.myhosting_domain.com. staff.myhosting_domain.com. (
2001062501 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
# Update your DNS server
IN NS ns1.myhosting_domain.com.
IN NS ns2.myhosting_domain.com.
# PTR for 192.168.1.100 -> web.example.com
100 IN PTR server.myhosting_domain.com.
and got these errors on check:
root@vmiservername:/etc/bind# named-checkzone 31.123.23.121 db.121.23.123.31
db.121.23.123.31:3: ignoring out-of-zone data (121.23.123.31.in-addr.arpa)
db.121.23.123.31:9: ignoring out-of-zone data (#.121.23.123.31.in-addr.arpa)
db.121.23.123.31:9: unknown RR type 'Update'
db.121.23.123.31:13: ignoring out-of-zone data (#.121.23.123.31.in-addr.arpa)
dns_rdata_fromtext: db.121.23.123.31:13: near '192.168.1.100': extra input text
db.121.23.123.31:14: ignoring out-of-zone data (100.121.23.123.31.in-addr.arpa)
zone 31.123.23.121/IN: loading from master file db.121.23.123.31 failed: unknown class/type
zone 31.123.23.121/IN: not loaded due to errors.