Linux+ADSL将会逐渐成为我们接入INTERNET的方式。我们以SuSe Linux 6.4为例,进行这种方式的具体实施。 
   首先,看看软件方面的准备。SuSe 6.4已含pppoed-0.46-7。如果没有该软件,也可到FTP://ftp.suse.com/pub/projects/T-DSL或 http://www.suse.de/en/support/download /updates/63_update.Html下载最新版本。 
   设置网卡和网关:# ifconfig eth0 mtu 1492 (不要为eth0设任何IP地址)。并确保你的default gateway 为空。 
   Add your login name and passWord to /etc/ppp/pap-secrets and /etc/ppp/chap-secrets。 
   这两个文件应象这样: 
"
[email protected]" * "mypassword" 
编辑/etc/resolve.conf 
nameserver 202.96.0.100 
nameserver 202.96.0.50 
在/etc/modules.conf中加入下面一行: 
alias char-major-144 pppox 
修改文件 /etc/ppp/options. 
# general options 
idle 600 
# this is a must 
user " 
[email protected] " 
sync 
local 
nocrtscts 
noauth 
usepeerdns 
mru 1490 
mtu 1490 
# this is recommended 
defaultroute 
hide-password 
nodetach 
# 
# switch off all compressions 
# this is a must 
noaccomp 
nopcomp 
# this is recommended 
novj 
novjccomp 
nobsdcomp 
nodeflate 
noccp 
   注意:Replace with your own login name. 
   运行 /usr/sbin/pppoed开始连接。 
   注意:只有root 用户可以启动连接。 
   If you use a network device other than eth0, you'll need to start /usr/sbin/pppoed with the option -I ethX, where X is the number of the device。 
   检验、测试连接:用tail -f /var/log/messages可跟踪并诊断ADSL的连接状态,用ifconfig可以查看你的ppp0设备被分配的IP地址,如果地址分配成功,就说明已建立连接。用route命令可查看拔入服务器为你指定的网关地址。用ping www.hermes.com.cn应该可以ping通,如果不通,有可能是你的DNS设置问题。 
   代理局域网上网。安装一个网卡,设置IP地址为192.168.1.1; 
   加入一条IP转发的规则:/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0。局域网内client将192.168.1.1设为缺省网关。 
            
               
                [1] [2] 下一页 
              
            
            
            
            
                
              
            
            
   现在,我们就可通过这台LINUX+ADSL代理服务器上网了。 
(出处:http://www.sheup.com)
            
               
                上一页 [1] [2]