Archive for November, 2010

Setup an IPv6 enabled Asterisk server

November 26th, 2010 No comments

According to, at the time of this writing, we’ve got 95 days left until we’re out of IPv4 addresses. Fortunately for us, Asterisk 1.8 has native support for SIP over IPv6. Even if your ISP isn’t handing out IPv6 addresses, doesn’t mean you can’t take advantage of Asterisk’s native IPv6 support. By utilizing a free tunnel broker, you can run an IPv6 enabled Asterisk server on your existing IPv4 Internet connection and provide IPv6 connectivity to the rest of your network.

Since your Internet connection only supports v4 addresses, you’ll need to setup a tunnel on your server to an IPv6 “tunnel broker”.  This tunnel allows you to assign your Asterisk server, and all the machines on your network with public IPv6 addressees. All of your IPv6 traffic flows through this tunnel over you existing v4 Internet connection. You can sign up for a free tunnel at

Configure your Asterisk Server for IPv6

1. Enable IPv6 – Make sure these lines are in /etc/sysconfig/network

nano /etc/sysconfig/network


2. Assign eth0 an IPv6 address – This file contains your IPv4 address information as well. Copy the below lines in addition to what’s already in there. Take the “Routed /64″ from your account page and add a 1 to the end. Example, if my routed /64 was 2001:xxx:x:xxx::/64, I would assign 2001:xxx:x:xxx::1/64 for IPV6ADDR=

nano /etc/sysconfig/network-scripts/ifcfg-eth0


3. Setup the IPv6 tunnel interface - This should be new file so there shouldn’t be anything in there.

nano /etc/sysconfig/network-scripts/ifcfg-sit1

IPV6TUNNELIPV4=Server IPv4 address as specified on your account page
IPV6ADDR=Client IPv6 address as specified on your account page

/etc/init.d/network restart

4. Enable IPv6 forwarding - add or change the following line in /etc/sysctl.conf

nano /etc/sysctl.conf


sysctl -p

5. Enable IPv6 auto-configuration on your LAN with radvd – Substitute the “prefix” with the “Routed /64″ from your account page. Since we are specifying a subnet here, do not add the 1 like we did for the ip address.

yum install radvd
nano /etc/radvd.conf

interface eth0
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
prefix 2001:xxx:x:xxx::/64
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;


/etc/init.d/radvd start

7. optionally add an IPv6 DNS server

nano /etc/resolv.conf

nameserver 2001:470:20::2

Configuring IPv6 support in Asterisk:

Enabling IPv6 support in Asterisk is incredibly simple. In your sip.conf enable SIP on all addresses by placing bindaddr=:: in the [general] section



Asterisk will now route SIP traffic over IPv6 for any peers/users that have either a valid AAAA record for their hostname, or if you specify a peer/user with an IPv6 address.

Categories: Asterisk, sip Tags: