- 论坛徽章:
- 0
|
安装pppoe
说明:pppoe是透过ethernet网络连接ADSL的驱动程序
安装:
环境:
使用中华电信ADSL;含路由器
主机使用FreeBSD 4.7系统作nat
设定列表:(仅列出相关及必要的设定)
开机设定:/etc/rc.conf
hostname="nat.cyrhome"
named_enable="YES"
# ----- inside
interface -----
ifconfig_de0="inet
10.1.1.254
netmask 255.255.255.0"
# ----- outside
interface -----
ifconfig_vr0="inet
10.1.2.254 netmask 255.255.255.0 -arp up"
# --- for ADSL
---
#we run it from
/usr/local/etc/rc.d/ppp.sh
#This enables PPP on startup (recommended)
#ppp_enable="YES"
#ppp_mode="background"
#ppp_profile="pppoe"
# -- for Natd
setup --
gateway_enable="YES"
firewall="OPEN"
natd_interface="vr0"
natd_enable="YES"
开机自动执行档:/usr/local/etc/rc.d/ppp.sh
设定开机时会自动执行;要设定为可执行档;
#!/bin/sh
ppp=/usr/sbin/ppp
if [ -f $ppp ];
then
$ppp
-background -nat pppoe
ifconfig tun0
fi
PPPoE的设定档:/etc/ppp/ppp.conf
账号,密码为你在ADSL供应者(中华电信)上的账号及密码
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:
set device
PPPoE:vr0:
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 l账号@hinet.net
set
authkey 密码
set ifaddr 61.216.92.1/0 61.216.92.255/0 255.255.255.255
add default HISADDR
enable dns
# end of ppp configuration
若使用动态DNS尚须作下列设定:
(狄恩斯科技公司的转址服务)
在定时执行档中加入:(/etc/crontab)
# ----- change
DN-ip map -----
# modi by cyr
2002.10.22
*/5 * * * * root /etc/ppp/ppp.linkup
编辑DDNS更新执行档:
第2,3列连成一列
账号,密码为你在DDNS供应者上的账号及密码
主机名称为你在DDNS供应者上设定的主机名称
#!/bin/sh
echo '&did=账号&mpasswd=密码&service=2&ver=xray1.1&hostname
=主机名称'| lynx
http://www.adsldns.com:8080/clientupdate.php -post_data
93.09.07补充:
Windows xp 已内建,不需安装;其它请参考
25 申请IP各项事宜
文件
hinet已提供自动转址服务,可参考12 FreeBSD
的HINET转址文件
HINET的2M已提供1固IP ,7 浮动IP的申请服务,此时要使用switch
连HINET的路由器才可同时上网.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7801/showart_58322.html |
|