Article Title: How to set up PPPoE server In Debian Environment. 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.
I. Environment
Server debian 2.6.18
Authentication Server radius + mysql
Software ppp-2.4.4 rp-pppoe-3.8 (radiusclient)
Ii. Setup steps
1. Compile the kernel
To implement PPPoE, you must first compile the kernel so that the kernel supports PPPoE. I will not describe it here. There are a lot of online websites. I believe many people have compiled their own kernels.
2. Download and install ppp and pppoe Software
(1) install ppp Software
The ppp-2.4.4 is used here. After downloading it, unzip it to/usr/src/ppp/
Compile:
Cd/usr/src/ppp/ppp-2.4.4/
. /Configure -- prefix =/usr/local/ppp // specify the location of the PPP Installation
Make
Maek install
(2) install rp-pppoe
After the rp-pppoe-3.8 is downloaded, decompress it to/usr/src/ppp/
Cd/usr/src/ppp/rp-pppoe-3.8/src
. /Configure -- prefix =/usr/local/ppp -- enable-plugin =/usr/src/ppp/ppp-2.4.4
Specify the rp-pppoe installation location as/usr/local/ppp, load ppp path/usr/src/ppp/ppp-2.4.4
Make
Make install
(3) install radiusclient
This is simple. apt-get install radiusclient directly
But check whether there is a radiusclient.
(4) create a pppd shortcut
Since my PPP and rp-pppoe are self-compiled and installed in specified paths, the installer will not install pppd to the default system path/usr/bin /, therefore, we need to establish a connection to connect pppd to the default system path.
Ln-s/usr/src/local/ppp/sbin/pppd/usr/bin/pppd
(5) Configure pppd
Change/etc/ppp/pppoe. conf. It seems that there is nothing to change, just pay attention
# Ethernet card connected to DSL modem
ETH = eth1
Specify which Nic you want to dial
(6) Configure pppoe-server-options
Auth
Refuse-pap
Require-chap
Default-mru
Default-asyncmap
Lcp-echo-interval 60
Lcp-echo-failure 5
Ms-dns x. x
Noipdefault
Noipx
Nodefaultroute
Noproxyarp
Noktune
10.0.0.1: 10.0.0.254
Netmask 255.255.255.255
This is the configuration on my server. For more information, see configuration instructions.
Refuse pap
Require chap // authentication method
Ms-dns x. x configure the DNS server for the client. The customer will be designated the DNS server.
10.0.0.1: 10.0.0.254
Netmask 255.255.255.255 specify the IP address range allocated after successful PPPoE dialing.
(7) Configure options
Asyncmap 0
Auth
Crtscts
Nobsdcomp
Nodeflate
Nopcomp
Plugin/etc/ppp/plugins/radius. so
Radius-config-file/etc/radiusclient. conf
Defaultroute
Local
Lock
Hide-password
Modem
Proxyarp
Lcp-echo-interval 30
Lcp-echo-failure 4
Ipcp-accept-local
Ipcp-accept-remote
Noipx
Idle 3600
Where
Plugin/etc/ppp/plugins/radius. so
Radius-config-file/etc/radiusclient. conf
The two rows specify the location for loading radius. so and the location of the radius-config configuration file. These two are very important because I use radius for authentication.
Check whether there is radius. so in the/etc/ppp/plugins/directory. If not, COPY one from the installation directory.
Cp/usr/local/ppp/lib/pppd/2.4.4/radius. so/etc/ppp/plugins/
(8) Configure/etc/radiusclient. conf
Yes
Auth_order radius
Authserver x: 1812
Acctserverx: 1813
(9) Configure/etc/radiusclient/servers
Add the password for communication with the radius server and the server name to the file.
# Make sure that this file is mode 600 (readable only to owner )!
#
# Server Name or Client/Server pair Key
#----
# Portmaster.elemental.net hardlyasecret
# Portmaster2.elemental.net donttellanyone
Msrv whereknife
(10) set IP Forwarding
Echo "1">/proc/sys/net/ipv4/ip_forward