1-*- text -*- 2 3To use radns in FreeBSD, edit /etc/rc.conf and add: 4 5 radns_enable="YES" 6 7Unless you installed radns through a port, copy the radns.sh start 8script from the tarball to /usr/local/etc/rc.d/radns. 9 10Check out that script for more configuration options. 11 12Start radns as root by typing: 13 14 # /usr/local/etc/rc.d/radns start 15 16At the next reboot, radns will start automatically. The resulting 17resolv file will be /usr/local/etc/radns/radns-resolv.conf if you 18installed by port. Set specifically if you installed from the tarball! 19 20Look in the radns.sh script for more variables to set in rc.conf. 21 22== Creating the system's resolv.conf == 23 24If you're on a IPv6 only machine, make /etc/resolv.conf a symbolic 25link to /usr/local/etc/radns/radns-resolv.conf: 26 27 # ln -s /usr/local/etc/radns/radns-resolv.conf /etc/resolv.conf 28 29That's it. 30 31If you're on a dual stack machine things are more complicated. You can 32merge the information from the system's DHCP client (dhclient) and 33from radns in at least two ways, one simple and one more complex: 34 35 - The Simple Way 36 37 Copy the example script in 38 39 /usr/local/etc/radns/dhclient-exit-hooks 40 41 to the /etc directory. 42 43 dhclient will now merge the data from radns into /etc/resolv.conf 44 whenever it receives new DHCP information. 45 46 - The Hard Way 47 48 Make both the DHCP client and radns use the resolvconf program. 49 This is already the case on some other systems, notably Debian 50 GNU/Linux. 51 52 Warning: This is not quite working on FreeBSD yet, but this text 53 is provided as a start. 54 55 a) Install the dns/openresolv port which contains the resolvconf 56 program. 57 58 b) Copy the /sbin/dhclient-script to /etc/dhclient-script and 59 replace the add_new_resolv_conf() function with something like 60 this: 61 62 add_new_resolv_conf() { 63 local tmpres=/var/run/resolv.conf.${interface} 64 rm -f $tmpres 65 66 > $tmpres 67 [ "$new_domain_search" ] && echo search $new_domain_search >> 68 $tmpres 69 [ "$new_domain_name" ] && echo domain $new_domain_name >> 70 $tmpres 71 72 if [ -n "$new_domain_name_servers" ] 73 then 74 for nameserver in $new_domain_name_servers 75 do 76 echo "nameserver $nameserver" >> $tmpres 77 done 78 fi 79 80 # Add what we got from DHCP to the store: 81 /usr/local/sbin/resolvconf -a $interface < $tmpres 82 83 # Run the update scripts. 84 /usr/local/sbin/resolvconf -u 85 86 return 1 87 } 88 89 c) Tell dhclient to use your new script by editing 90 /etc/dhclient.conf and adding something like this: 91 92 interface "em0" { 93 script "/etc/dhclient-script"; 94 } 95 96 d) Make /etc/resolv.conf a symbolic link to resolvconf's file. 97 98 # ln -s /usr/local/etc/resolvconf/run/resolv.conf /etc/resolv.conf 99 100 e) Make /var/run/resolvconf writable by both the _dhcp and the 101 radns user, perhaps by making it group writable and using a 102 common group. 103 104 Currently this doesn't seem to work because something changes 105 the modes on the created files, perhaps the resolvconf program. 106 107 e) Edit /etc/rc.conf and add 108 109 radns_enable="YES" 110 radns_script="/usr/local/etc/radns/radns-script" 111 112== Router Software == 113 114For radns to be at all useful, there must be a corresponding program 115on the IPv6 router. This program is responsible for sending out Router 116Advertisements. The default rtadvd in base doesn't support RDNSS or 117DNSSL yet. One such program is net/radvd in ports, also available 118here: 119 120 http://www.litech.org/radvd/ 121 122You need to configure radvd to send out the RDNSS and DNSSL options. 123Here's a complete configuration for testing purposes: 124 125interface em0 126{ 127 AdvSendAdvert on; 128 prefix 2001:db8:1:0::/64 { }; 129 RDNSS 2001:db8:1::1 { }; 130 DNSSL example.com { }; 131} 132 133Be sure to change "em0" to what your network interface is called. 134 135You need to turn on IPv6 forwarding on your router, otherwise radvd 136won't start. On FreeBSD, this is done by setting 137 138 net.inet6.ip6.forwarding=1 139 140If you want this to survive reboots, set 141 142 ipv6_gateway_enable="YES" 143 144in rc.conf. 145