IPv6 DNS servers from Radius

Here you can post your feature requests and suggestions
Post Reply
hardillb
Posts: 14
Joined: 13 Feb 2020, 23:19

IPv6 DNS servers from Radius

Post by hardillb »

Hi,

I'm trying to set IPv6 DNS servers from the Radius response for a given user with PPPoE

I've tried using DNS-Server-IPv6-Address but it doesn't seam to be being passed on to the client, either by PPP or DHCPv6. Having looked in the dictionaries shipped with src I don't see the definition and it doesn't look to be in radius.c.

I can set the IPv4 DNS server with MS_Primary_DNS_Server

Is it currently possible or do they need to be set in the config file?

Thanks,
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: IPv6 DNS servers from Radius

Post by dimka88 »

Hi. As I see in code, this is not implemented for ipv6. I think this is nice feature request.
hardillb
Posts: 14
Joined: 13 Feb 2020, 23:19

Re: IPv6 DNS servers from Radius

Post by hardillb »

Thanks for the reply,

I've set them statically in the config file for now, but I will need to hand out different DNS servers to different users.

I might see if I can work out how to add support, if I get something working I'll stick in a pull request.
hardillb
Posts: 14
Joined: 13 Feb 2020, 23:19

Re: IPv6 DNS servers from Radius

Post by hardillb »

I've been having a play and I think I'm missing something.

I have a fork with my (very rough) changes here: https://github.com/hardillb/accel-ppp

The problem looks to be

Code: Select all

ev->ses->ipv6
is not "true" when I test it in the event callback in nc.c and dhcpv6.c

Any pointers to would be great.

Ben
hardillb
Posts: 14
Joined: 13 Feb 2020, 23:19

Re: IPv6 DNS servers from Radius

Post by hardillb »

For reference the content of the LDAP:

Code: Select all

dn: uid=isp1,ou=users,dc=hardill,dc=me,dc=uk
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: radiusprofile
displayName: Ben Hardill
cn: Ben
sn: Hardill
mail: isp1@hardill.me.uk
uid: isp1
radiusReplyAttribute: MS-Primary-DNS-Server := "192.168.5.1"
radiusReplyAttribute: DNS-Server-IPv6-Address := "fd12:3456:789a:ff64::1"
radiusReplyAttribute: Framed-IPv6-Prefix := "fd12:3456:789a:0:192:168.5.2/128"
radiusReplyAttribute: Reply-Message := "Hello World"
radiusReplyAttribute: Delegated-IPv6-Prefix := "fd12:3456:789a:2::/64"
radiusFramedIPAddress: 192.168.5.2
radiusFramedIPNetmask: 255.255.255.0
Post Reply