實做PPPoE Server with Ubuntu12.04

記錄一下在ubuntu12.04上實做PPPoE Server

/etc/ppp/pppoe-server-options

# PPP options for the PPPoE server
# LIC: GPL
# require-pap 
require-chap		//預設是跑MD5的Auth
# require-mschap-v2	//指定用MSCHAPv2來驗證
#login			//這個表示使用本機的account在LCP階段來對peer進行auth
#auth
lcp-echo-interval 30
lcp-echo-failure 5
#ms-dns 8.8.8.8
# nodefaultroute

 

/etc/ppp/options

asyncmap 0
local
netmask 255.255.255.0
noipdefault
-pap
-chap
-vj
mtu 1492
lcp-echo-interval 30
lcp-echo-failure 5
noipx

 

/etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
guest   *       guest   *

 

Start Service Command

sudo /usr/sbin/pppoe-server -I eth0 -L 192.168.100.1 -R 192.168.100.2 -N10 -F

-I 監聽的Interface
-L location IP addr
-R remote peer IP addr
-N 允許的連線數目
-F 不以Service形式fork在背景.
 

Debug tools

tecom@ZyXEL-OLT-test-PC:~$ plog
Mar 11 20:24:21 ZyXEL-OLT-test-PC pppd[4204]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Mar 11 20:24:24 ZyXEL-OLT-test-PC pppd[4204]: local  IP address 192.168.100.1
Mar 11 20:24:24 ZyXEL-OLT-test-PC pppd[4204]: remote IP address 192.168.100.3
Mar 11 20:24:24 ZyXEL-OLT-test-PC pppd[4204]: Can't execute /etc/ppp/ip-up: Invalid argument

 

refer:
http://chunchaichang.blogspot.tw/2011/09/linux-pppoe-server.html
http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=286932
http://www.cnblogs.com/kungfupanda/p/3268453.html
https://bbs.archlinux.org/viewtopic.php?id=120781

Facebook Comments
Scottj Written by:

史考特 喜歡3C 愛拍照