How to Create a billing server in Linux

Source: Internet
Author: User
Article Title: how to use a billing server in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
How to Create a billing server in Linux
  
Many ISPs can implement the billing function for dial-in users. It is easy to implement this function in Linux, and the investment is almost zero. This article describes how to create an xtacacsd billing Server Based on the cisco3640 router in the Redhat Linux 5.1 environment.
  
1. xtacacsd acquisition, compilation, and installation
  
Xtacacsd can directly use the password file/etc/passwd in Liunx to verify the user and record the time when the user logs on to the server. This not only improves confidentiality, but also ensures consistency between the dialing process and the user name and password in the email. In addition, you can set corresponding charging standards based on the time when the user logs on to the server to achieve billing.
  
1. xtacacsd package acquisition
  
Xtacacsd can be downloaded from Ftp: // ftp.navya.com/pub/vikas. The downloaded file is often compressed format (such as: xtacacsd-4_1_2_tar.gz), save the downloaded file to a specific directory, such as/usr, and then decompress.
  
# Gunzip xtacacsd-4_1_2_tar.gz
# Tar xvf xtacacsd-4_1_2_tar
  
2. xtacacsd compilation and Installation
  
First go to the/usr/xtacacsd-4.1.2 directory,
  
Then, modify the statements in the Makefile file:
......
MYLIBS =-lcrypt
......
BINDIR =/var/adm/tacacs; directory where xtacacsd is installed
......
OS = LINUX20; Linux kernel version
  
Currently, xtacacsd supports 2. Versions earlier than 0
  
Finally, execute make all to compile and install the xtacacsd system files.
  
Ii. cisco router configuration
  
!
Interface s0
Ip address 202.199.250.1 too many
!
Interface Async1
Ip unnumbered s0
Encapsulation ppp
Async mode interactive
Peer default ip address pool bohao
No cdp enable
Ppp authentication pap if-needed; set to linux
Ppp use-tacacs; default route verification for Logon Verification
!
Interface Async2
Ip unnumbered s0
Encapsulation ppp
Async mode dedicated
Peer default ip address pool bohao
No cdp enable
Ppp authentication pap if-needed
Ppp use-tacacs
!
......
Ip local pool bohao 202.199.248.30 202.199.248.45
Tacacs-server host 202.199.248.6; specifies the host running xtacacsd
Tacacs-server last-resort password
Tacacs-server timeout 1000
Tacacs-server extended
Tacacs-server authenticate slip
Tacacs-server y connections
Tacacs-server policy enable
Tacacs-server logging y logout
Tacacs-server y slip
!
Line 1
Exec-Time out 200 0
Login tacacs
Modem inout
Transport input all
Speed115200
Flowcontrol hardware
Line 2
Exec-Time out 200 0
Modem inout
Transport input all
Speed115200
Flowcontrol hardware
!
......
Iii. xtacacsd process start and use of management tools
  
1. modify the content of the xtacacsd configuration file xtacacsd-conf before starting. Mainly include:
......
WTMP/var/adm/tacacs/wtmp
UTMP/var/adm/tacacs/utmp
.....
  
2. Create a directory
  
# Mkdir/var/adm
# Mkdir/var/tacacs
  
3. Start the xtacacsd process manually or automatically,
  
Manually start to enter the/usr/xtacacsd-4.1.2 directory, use the command:
  
./Xtacacsd-s-c xtacacsd-conf-u utmp-w wtmp/etc/passwd
  
You can add commands in the manual mode in/etc/inetd. conf or/etc/local/rc. sysinit in the automatic mode, but the complete path must be provided.
  
3. Use of taclast and tacupd tools
  
1) type the taclast command to view the utmp content of the accounting file.
  
2) taclast-u username can be used to view the usage of a specific user.
  
3) taclast-f utmpfile can be used to view the specified accounting file.
  
4) taclast? T username to view the cumulative usage of a specific user
  
The preceding parameters can also be used in combination.
  
Tacupd can increase or decrease a specific user record in the accounting file.
  
Of course, the xtacacsd system has other functions, which will not be described here.
  
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.