Step-1 安裝
PPPoE Server Software
a. sudo apt-get install ppp
b. wget -c http://easylinux.info/uploads/rp-pppoe-3.6.tar.gz
c.
sudo tar zxvf
rp-pppoe-3.6.tar.gz -C /opt/
d. sudo chown -R root:root
/opt/rp-pppoe-3.6/
3) 安裝軟體開發函示庫:
sudo apt-get install libc6-dev
4) 產生需要的pppoe server程式
sudo /opt/rp-pppoe-3.6/go
Step-2修改vi /etc/ppp/option 與 vi /etc/ppp/pppoe-server-options內容
# edit
vi /etc/ppp/option 參數設定
lock
crtscts
nobsdcomp
nodeflate
nopcomp
#
#Edit vi /etc/ppp/pppoe-server-options參數設定
require-chap
default-mru
default-asyncmap
lcp-echo-interval 60
lcp-echo-failure 5
ms-dns 168.95.1.1
noipdefault
noipx
nodefaultroute
#
Step-3 設定Client所要求的IP
pppoe-server -I eth1 -L 192.168.1.1 -R
192.168.1.10-200
-L IP : 指定interface 端的IP
-R IP: 發出去的IP範圍
修改
/etc/ppp/pppoe-server-options
require-chap 或 require-pap
可選擇兩種之ㄧ
/etc/ppp/pap-secrets
test * 123 *
/etc/ppp/chap-secrets
test * 123 *
Step-4 設定NAT Forward
echo
"1">/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING
-o eth0 -j MASQUERADE