1.2. 设置一个使用PPPOE的PPP呼出
将/etc/ppp中的ppp.conf进行备份,以下是新的ppp.conf中的内容:
default:
set log Phase Chat LCP IPCP CCP tun command
nat enable yes
nat same_ports yes
nat use_sockets yes
set redial 15 28800
set reconnect 15 28800
pppoe:
#加入在kernel中配置的会连接ADSL设备的网卡的名称,我的是fxp0
set device PPPoE:fxp0:
set mru 1492
set mtu 1492
set speed sync
enable lqr
set lqrperiod 5
set cd 5
set dial
set login
set timeout 0
set authname Your UserName used to login
set authkey Your Password used to login
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR# Add a (sticky) default route
enable dns
#注意:只有三处需要进行更改的地方,它们是PPPoE:fxp0: 以及用户名和密码
firewall_enable="YES"
firewall_type="open"
3.3.2. /etc/ppp/ppp.conf
set log Phase Chat LCP IPCP CCP tun command
nat enable yes
nat same_ports yes
nat use_sockets yes
set redial 15 28800
set reconnect 15 28800
cncadsl:
set device PPPoE:fxp0:
set mru 1492
set mtu 1492
set speed sync
enable lqr
set lqrperiod 5
set cd 5
set dial
set login
set timeout 0
set authname MyUserName
set authkey MyUserPassword
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR# Add a (sticky) default route
enable dns
3.3.3. kernel配置文件
# ADSL PPPOE Sup
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_SOCKET
options NETGRAPH_PPPOE
# IP Firewall Sup
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100