Install and configure PPPoE Server on Debian Squeeze PDF Cetak Email
Ditulis oleh Tutor TKJ CLUB   
Senin, 19 Maret 2012 09:02

For providing access via PPPoE it is required a PPPoE network access server (NAS) and a subscriber’s unit (PPPoE client).

 In this guide as a PPPoE network access server it is used a freeware packet rp-pppoe.

Step1. First we need intenet access and 2 network cards (eth0 – WAN, eth1 – LAN).

vim /etc/network/interfaces

auto lo
iface lo inet loopback
iface eth0 inet static
address 89.xxx.xxx.xxx #Your public IP address
netmask 255.xxx.xxx.xxx  #Your subnet mask
gateway 89.xxx.xxx.xxx    #Your gateway

iface eth1 inet static
address 192.168.4.254
netmask 255.255.255.0

Step2. Install ppp daemon:

apt-get install ppp

Step3Get rp-pppoe from here and install it.

wget http://www.roaringpenguin.com/files/download/rp-pppoe-3.10.tar.gz

Extract the archive:

tar -zxf rp-pppoe-3.10.tar.gz

Now compile it:

cd rp-pppoe-3.10/src/
./configure
make && make install
Step4. Edit the PPPoE server options:
vim /etc/ppp/pppoe-server-options
The file looks like this:
require-chap
login
lcp-echo-interval 10
lcp-echo-failure 2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns
Step5. Add usernames and passwords in the /etc/ppp/chap-secrets file:
vim /etc/ppp/chap-secrets
The file looks like this:
# Secrets for authentication using CHAP
# client server secret IP addresses
#USERNAME       SERVER              PASSWORD                            CLIENT IP ADDRESS
"user1"                            *               "password1"                                                                                  192.168.4.100
"user2"                            *              "password2"                                                                                   192.168.4.101
Step6. Now set up the IP addresses pool:

We will assign the future clients one IP address from the 192.168.4.1 to 192.168.4.200  range.

echo "192.168.4.1-200" /etc/ppp/allip
Step7.  Start  PPPoE server:
pppoe-server -C isp -L 192.168.4.254 -p /etc/ppp/allip -I eth1
Step8. Do not forget to enable packet forwarding between network interfaces:
echo 1 > /proc/sys/net/ipv4/ip_forward
And set up NAT in order to provide internet access to the LAN computers:
iptables -t nat -A POSTROUTING -s 192.168.4.0/24 -o eth0 -j MASQUERADE
Enjoy.

 

Sumber : http://www.debian-tutorials.com