How to run multiple instance of freeRADIUS on one server
Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction? Kind Regards, Kwesi
Use virtual servers? http://wiki.freeradius.org/config/Virtual-server On 17 November 2013 12:57, Kwesi Yankson <kkwised@yahoo.com> wrote:
Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction?
Kind Regards, Kwesi
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Dušan Dragić
I'd suggest using different ports. Just to save confusing others. Why not for virtual server N use 1812N and 1813N. Assuming you never get to 10 that'll be ok. Using 1813 (default accounting port) for authentication would confuse and annoy;) Neil On 17 Nov 2013 12:45, "Dušan Dragić" <dragic.dusan@gmail.com> wrote:
Use virtual servers? http://wiki.freeradius.org/config/Virtual-server
On 17 November 2013 12:57, Kwesi Yankson <kkwised@yahoo.com> wrote:
Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction?
Kind Regards, Kwesi
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Dušan Dragić - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Kwesi Yankson wrote:
Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815.
Read radiusd.conf. Look for "listen".
I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction?
Why google for months? Why not read the documentation and config files that come with the server? If you even read the output of debug mode, it would TELL YOU which ports it's using, and which file that configuration comes from. Then... edit the config to change the ports. Alan DeKok.
I run 5 instances of FR 2.x and two of 3.x on the same box in production with no problems, mainly to reduce the potential impact of administrative changes and upgrades. There are plenty of configuration directives to separate sockets and logging and whatnot. The configuration file can be specified on the command-line and you can even override where the dictionary comes from if needed. Though they are deprecated, there are older RADIUS ports at 1645/1646 that might be better supported if you stumble across a crummy NAS. ________________________________ From: freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org [freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org] on behalf of Kwesi Yankson [kkwised@yahoo.com] Sent: Sunday, November 17, 2013 6:57 AM To: freeradius-users@lists.freeradius.org Subject: How to run multiple instance of freeRADIUS on one server Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction? Kind Regards, Kwesi
Thank you Brian, I know it is possible. My concern is HOW TO DO IT. That's what I need help with. Can you help? On Monday, November 18, 2013 5:53 AM, Brian Julin <BJulin@clarku.edu> wrote: I run 5 instances of FR 2.x and two of 3.x on the same box in production with no problems, mainly to reduce the potential impact of administrative changes and upgrades. There are plenty of configuration directives to separate sockets and logging and whatnot. The configuration file can be specified on the command-line and you can even override where the dictionary comes from if needed. Though they are deprecated, there are older RADIUS ports at 1645/1646 that might be better supported if you stumble across a crummy NAS. ________________________________ From: freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org [freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org] on behalf of Kwesi Yankson [kkwised@yahoo.com] Sent: Sunday, November 17, 2013 6:57 AM To: freeradius-users@lists.freeradius.org Subject: How to run multiple instance of freeRADIUS on one server Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction? Kind Regards, Kwesi
Hello Kwesi, actually Brain told you how to do it between lines.
There are plenty of configuration directives to separate sockets and logging and whatnot. [...] The configuration file can be specified on the command-line
Hence, you have to create two different sets of configurations file(s), that differ in port numbers. Then you have to start two radius intances, each of them using one of the configuration directories. To get a quick start, copy the configuration directory (e.g. /etc/raddb/ or /etc/freeradius/) to something like "/etc/raddb2/". Then change the port numbers. In a productive environment a more sophisticated "copy" would probably be more senseful, i.e. only make copies of the files you need to change and use symlinks for the common configuration. For debugging purpose you can use the "-C <directory>" option from command line. The first instance gets "-C /etc/raddb", the second gets "-C /etc/raddb2". If you want your distribution to start both Freeradius instances, you have to alter the init scripts of your linux distro accordingly. Look at /etc/init.d/freeradius or /etc/init.d/radcct or similar and try to understand, how the init script of your distro works and where the configuration directory is set. Then change accordingly. But this is highly dependent on your linux distribution. Matthias 2013/11/18 Kwesi Yankson <kkwised@yahoo.com>:
Thank you Brian, I know it is possible. My concern is HOW TO DO IT. That's what I need help with. Can you help?
On Monday, November 18, 2013 5:53 AM, Brian Julin <BJulin@clarku.edu> wrote:
I run 5 instances of FR 2.x and two of 3.x on the same box in production with no problems, mainly to reduce the potential impact of administrative changes and upgrades. There are plenty of configuration directives to separate sockets and logging and whatnot. The configuration file can be specified on the command-line and you can even override where the dictionary comes from if needed.
Though they are deprecated, there are older RADIUS ports at 1645/1646 that might be better supported if you stumble across a crummy NAS.
________________________________ From: freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org [freeradius-users-bounces+bjulin=clarku.edu@lists.freeradius.org] on behalf of Kwesi Yankson [kkwised@yahoo.com] Sent: Sunday, November 17, 2013 6:57 AM To: freeradius-users@lists.freeradius.org Subject: How to run multiple instance of freeRADIUS on one server
Hello, I am using freeRADIUS 2.0 on Ubuntu Server 12.04 LTS I want to know how to run multiple instances of freeRADIUS on one server. In this case I want instance-A to have the authentication port to be 1812 and instance-B to have authentication port to be 1814. The acct port for instance-A to be 1813 and the acct port for instance-B to be 1815. I am thinking this is possible but I've been google for months now and have come up with nothing. Can you please point me in the right direction?
Kind Regards, Kwesi
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Matthias Nagel Parkstraße 27 76131 Karlsruhe Festnetz: +49-721-96869289 Mobil: +49-151-15998774 e-Mail: matthias.h.nagel@gmail.com ICQ: 499797758 Skype: nagmat84
On 18/11/13 10:44, Kwesi Yankson wrote:
Thank you Brian, I know it is possible. My concern is HOW TO DO IT. That's what I need help with. Can you help?
Here's how I do it. Basically, use the "-n" argument to radiusd, ${} expansion, and a bit of $INCLUDE stuff to reduce typing. 1. Each server instance lives in "/etc/raddb/blah.conf" and looks like this: # The next line is a marker for the init script: # RADIUS INSTANCE # per-process stuff goes here; reference it elsewhere # with ${svopts.name} - see the next stop for examples svopts { name = blah status_port = 10001 num_threads = 10 ... } # this file contains all the easy stuff - see next step $INCLUDE common.conf # load the various virtual servers $INCLUDE sites-enabled/blah $INCLUDE sites-enabled/blah-tunnel $INCLUDE sites-enabled/status 2. We stick boring stuff in a "common.conf" file that uses variables from the "svopts". For example: # paths prefix = /usr ... # NOTE: using a per-process PID file pidfile = ${run_dir}/radiusd-${svopts.name}.pid log { destination = files # NOTE: per-proces logfile file = ${logdir}/radius-${svopts.name}.log ... } thread pool { start_servers = ${svopts.num_threads} max_servers = ${svopts.num_threads} } 3. We have a custom init script that basically does this: start() { for instance in `egrep -l '^# RADIUS INSTANCE' /etc/raddb/*.conf` do NAME=`basename $instance .conf` radiusd -d /etc/raddb -n $NAME done } stop() { for instance in `egrep -l '^# RADIUS INSTANCE' /etc/raddb/*.conf` do NAME=`basename $instance .conf` PID=`cat /var/run/radius/radiusd-$NAME.pid` [ -n "$PID" ] && kill $PID done }
participants (7)
-
Alan DeKok -
Brian Julin -
Dušan Dragić -
Kwesi Yankson -
Matthias Nagel -
Neil - FreeRadius List -
Phil Mayers