[RP-PPPoE] getting work ipv6 on pppoe
Blackhold
blackholdmailer at gmail.com
Sun Nov 30 22:57:17 EST 2014
Hi,
I continue working on making work ipv6 over pppoe, finally I have
created an script at /etc/ppp/ipv6-up.d/ to take values and configure
IPv6. I could make work to get up the default route at IPv6
router-client adding +ipv6 to /etc/ppp/options file...
I don't want to use radvd, I have in my radius all the definition of
wich IPv6 has to have the user
Here I paste my script, but I need some way to catch the username that
is doing the connection, but I'm not able to found anything, the
dummiest way is to take it from the logs, but I don't like it a lot...
#!/bin/bash
USERNAME=`tail -180 /var/log/pppoe.log |awk '/name/ && /Response/ {
gsub("]","",$0); gsub("\"","",$0); print $8}' |tail -1`
SERVER=`cat /etc/radiusclient/servers |awk '{print $1}' |tail -1`
SERVER_PASS=`cat /etc/radiusclient/servers |awk '{print $2}' |tail -1`
QUERY=`
mysql -u polaris-ppp -p****** -h $SERVER -Dradius << EOF
select value from radcheck where username='$USERNAME';
EOF`
USER_PASS=`echo "$QUERY" |tail -1`
RADQUERY=$( radtest $USERNAME $USER_PASS ${SERVER}:1812 1 $SERVER_PASS )
IPv6=`echo "$RADQUERY" |grep Framed-IPv6-Prefix |awk '{print $3}'`
IP1=`grep $USERNAME /etc/capa8/* |grep IP1 |awk '{print $4}'`
IP2=`grep $USERNAME /etc/capa8/* |grep IP2 |awk '{print $4}'`
ip addr add ${IP1}/127 dev $1
ip route add $IPv6 via $IP2
Maybe it's not the best way to do that, but is the one it worked to me :(
Using dictionaries it don't takes the value, on /var/run/radattr.pppX
it appears the value, but it appears empty....
I found really not a lot of documentation about this... some help will
be welcome...
Thanks you much
- Blackhold
http://blackhold.nusepas.com
@blackhold_
~> cal lluitar contra el fort per deixar de ser febles, i contra
nosaltres mateixos quan siguem forts (Esquirols)
More information about the RP-PPPoE
mailing list