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 gatewayiface eth1 inet static
address 192.168.4.254
netmask 255.255.255.0
Step2. Install ppp daemon:
apt-get install ppp
Step3. Get rp-pppoe from here and install it.
wgetrp-pppoe-3.10.tar.gzhttp://www.roaringpenguin.com/files/download/
Extract the archive:
tar -zxf rp-pppoe-3.10.tar.gz
Now compile it:
cdrp-pppoe-3.10/src/./configuremake&&makeinstall
vim/etc/ppp/pppoe-server-options
require-chaploginlcp-echo-interval 10lcp-echo-failure 2ms-dns 8.8.8.8ms-dns 8.8.4.4netmask 255.255.255.0defaultroutenoipdefaultusepeerdns
/etc/ppp/chap-secrets file:vim/etc/ppp/chap-secrets
# 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
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
pppoe-server -C isp -L 192.168.4.254 -p/etc/ppp/allip-I eth1
echo1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.4.0/24 -o eth0 -j MASQUERADE

January 13th, 2012 on 10:04
please, don’t make slackware from debian
debian has rp-pppoe source package since lenny at least:
sudo apt-get build-dep rp-pppoe
apt-get source rp-pppoe
cd rp-pppoe-VERSION
fakeroot debian/rules binary
sudo dpkg -i ../pppoe-VERSION.deb
January 29th, 2012 on 23:37
Seems to be, than “-j MASQUERADE” do job only for ppp out connections. In my case — outgoing eth0 Ethernet interface with dhcp — MASQUERADE did non change the picture, so I use SNAT with specification outgoing (nat) interface’s address and without source address range specification:
iptables -t nat -A POSTROUTING -o eth0 -j SNAT –to-source 89.xx.xx.xx