Posts tagged VPN
Setup PPP with Freeradius
6This article shows how to setup VPNs with freeradius and daloradius web UI.
Step 1: setup connection between daloradius and mysql
Daloradius is an open source web UI for radius. Its project webpage is:
http://sourceforge.net/projects/daloradius/
The INSTALL guide could be found in the root folder of daloradius. In a brief, you should setup a new database uses the schema in contrib/db/ and provides database information to library/daloradius.conf.php. If you uses freeradius 2.X versions, make sure you set the radius version as ’2′ in daloradius.conf.php. The usergroup table name was misconfigured as “usergroup”. Make sure you change it to “radusergroup” in daloradius.conf.php.
After setup, you can login daloradius as administrator.
Notice:
The latest version in SVN is highly recommend. The stable version 0.9.8 is not compatible with Freeradius 2.X versions.
Now the 0.9.9 is highly recommended. It is compatible with Freeradius 2.X versions.
The daloradius needs php pear db module. Make sure the module is installed in your php environment and the path to the module is included in the php.ini configuration file.
Step 2: setup connect between freeradius and mysql
Almost all the configuration file now is provided in daloradius SVN contrib/configs/. Replace the configuration file in freeradius with ones in daloradius, counter.conf, sql.conf, radiusd.conf and the default site configuration in site-enabled folder.
Then setup the database access in sql.conf.
Step 3: Setup first user and test
If you uses the configuration file provided by daloradius, the NAS information is set to find in database, not file.
Therefore first, add a new NAS in daloradius NAS section, the IP address could be 127.0.0.1 Then add a new user in daloradius.
Start freeradius, it could be “freeradius -X”
Test the user connectivity in daloradius. If everything is OK, it should return “Accepted”.
Notice:
If you want to use simultaneous session count only by database, by the default site file in daloradius config schema, the session is counted both in radutmp and database. In the session section of the site file, I commented radutmp. In the sql.conf, I enabled the simultaneous count. This would make the radius only count the simultaneous session in database, without file written.
Step 4: Setup PPP radius plugin
Usually ppp radius plugin is not included in Debian, or other distributions. To get ppp radius plugin, you can download pppd source and run “./configure” and “make”. radattr.so and radius.so are the two plugin I use, which can be found in /pppd/plugins/radius/. On my server, the IP pool is handled by file, not database.
Copy radiusclient folder out from pppd source, to someplace, such as /etc/, and configure the server and shared secrets in radiusclient/servers, if the radius server is the same server where PPP runs, the IP should be 127.0.0.1
Step 5: Setup PPTP/L2TP with radius authorization
setup PPTP/L2TP as normal, add plugin and radiusclient path in the pptpd options file. On my server, it is
plugin /etc/radiusclient/radius.so
plugin /etc/radiusclient/radattr.so
radius-config-file /etc/radiusclient/radiusclient.conf
Till now, everything is fine.
I am not very good at writing instructions, if you have any questions, feel free to contact me.
L2TP over IPV6 Router
0I posted l2tp over ipv6 before. It is a patch file for xl2tpd from Cheng Li, which enable xl2tpd working under ipv6 network for Windows Vista/7 VPN Clients.
And this is the openwrt firmware for buffalo whr-hp-g54 from Cheng Li which includes the hacked xl2tpd. After flashed the hacked firmware, buffalo whr-hp-g54 can connect l2tp server under IPV6.
I just bought Linksys WRT54GS v3. Hope it works.
These are the links you may concern:
Blog Post: L2tp over IPV6 in Linux
Hacked buffalo firmware
P.S. It is really easy to compile your own openwrt firmware. Just put the patch file into the patch folder of xl2tpd in the openwrt source code, change its file name and make sure it would be patched at last. The makefile should be modified cuz the patch file is only for xl2tpd 1.2.4.
PPP Using Freeradius and Mysql, Controled in Daloradius
3There exists PPP VPN on my server. I used auth-file to manage user account before, but it was not efficient. Now, after radius established, almost everything can be done in WEB!!!
PPP can be used as a NAS of Radius, but it is not fully functioned. I cannot send packet of disconnection to PPP from Radius and terminate a user’s connection. But other functions work fine.
I am using ppp, freeradius, mysql and daloradius. It took me a long time on debug. And now it works fine.
Let me pick some pics.
Here is the sql.conf I am using. Hope it helps.
The stable version was for freeradius 1.x, which means you have to edit the sql.conf and PHP files in daloradius to make it work well.
The daloradius in SVN supports Freeradius 1.x and 2.x very well. I recommend you visit the newer guide HERE.
May Brother Chun Shines on You
0I tried to equip dd-wrt or open-wrt with static router list and PPTP tunnel. I failed due to limited knowledge. Today I surprisedly found a new google code project: autoddvpn was established, which is an auto shell script designed for dd-wrt. It is really a great project. You can find the project by searching its name on google code. I am afraid I cannot provide the link due to the well-known reason.
I have an advertisement for my equipped router: The package is guided, the privacy is guarded, and the speed is guaranteed, by the holy lord of God, Brother Chun. May Brother Chun Shines on You.
Wall Day
2What day is it today? Two people asked me about the wall problem at the same time. Did I say it load that I have the ability to cross the wall?
I offered each of them an account on my server. But this isn’t over. As time goes by, I think more and more people will have the wall problem. On the other side, IPV6, a protocol which cannot be walled is available in my home. What is the future like? I don’t know.
But there is one thing confirmed, I will win the bet made with VcinVoice. He said the wall will disappear in Shanghai during Expo 2010. But it is more likely to be higher, and higher according to the scene now.
VPN(L2TP) over IPV6 in Linux
3I own a VPS in Rapidxen who provides me native IPV6 network. The blog is established on the vps.
For several reasons I want to establish a VPN over IPV6 in Debian. I searched and searched, getting more and more disappointed. Poptop (pptpd) was written in 2007 with no ipv6 support. Neither is xl2tpd. After sadness and useless trying, I found a patch of xl2tpd 1.2.4 (still works with 1.2.5) written by Cheng Li, a Chinese developer.
His Article is Here:http://blog.lifetoy.org/2009/09/11/vpn-over-ipv6/
The xl2tpd can be found Here and the ipv6 patch diff can be found Here. Patch the file and install it following the README file in doc directory. Enjoy it!
P.S. The patched L2TP lost some config feature such as LNC Range which, however, cannot cover the light of the patch.











