1
0
Fork 0
RDNS resolution for ipv6 clients who got address from SLAAC. This project updates /etc/hosts which can then be read by a resolver to respond to ptr queries in queries in your local search domain
Go to file
Ishan Jain de6581e72d
do not print to stdout
2023-11-07 17:30:37 +05:30
src do not print to stdout 2023-11-07 17:30:37 +05:30
.gitignore Added readme, the whole project 2023-11-07 03:33:39 +05:30
Cargo.lock Added readme, the whole project 2023-11-07 03:33:39 +05:30
Cargo.toml Added readme, the whole project 2023-11-07 03:33:39 +05:30
README.md updated readme 2023-11-07 03:40:31 +05:30

README.md

rdns-ipv6

In dual stack networks, This project can help in rdns resolution of IPv6 addresses by reusing hostname from DHCPv4 leases for that client.

It works like this,

  1. Read IPv6 neighbours on the machine.
  2. Identify hostname for this IPv6 client by trying to find a IPv4 lease for this MAC address
  3. Update /etc/hosts with a list of IPv4 and IPv6 records.

There should be unbound or some other DNS resolver running on the machine to read /etc/hosts and respond to PTR queries and queries in your local search domain. This program does not handle any aspect related to that.

This program exits after modifying /etc/hosts. It can be used with systemd to run at some interval.

It might be better to run this some how on netlink events, I have not looked into it yet.

# /etc/systemd/system/rdns-ipv6.timer
[Unit]
Description=rdns-ipv6

[Timer]
OnUnitActiveSec=30s
OnBootSec=30s

[Install]
WantedBy=timers.target


#/etc/systemd/system/rdns-ipv6.service
[Unit]
Description=RDNS for IPv6

[Service]
Type=oneshot
ExecStart=/config/rdns-ipv6