做个ADSL+LINUX软路由器
3、下一步做ADSL的驱动。去http://www.roaringpenguin.com/pppoe/rp-pppoe-2.6.tar.gz 下个驱动程序先,大概85K大小。 考到/root去。
本文引用地址:https://www.eepw.com.cn/article/267508.htm然后 #tar xvfz rp-pppoe-2.6.tar.gz
#cd rp-pppoe-2.6
#./go
开始安装,装好就#make一下下,开始配置ADSL。
Welcome to the Roaring Penguin ADSL client setup. First, I will run some checks on your system to make sure the PPPoE client is installed properly... Looks good! Now, please enter some information:
USER NAME
>>> Enter your PPPoE user name (default):
这里输入在电信局申请的adsl的帐号
INTERFACE
>>> Enter the Ethernet interface connected to the ADSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where 'n' is a number.(default eth0):
问你用哪片网卡拨号,默认是第一片eth0就可以了
4、最后一步:配置ipchains伪装IP。
在 /etc/sysconfig的network文件里保证要有这句: FORWARD_IPV4=true
然后改/etc/rc.d/rc.local这个文件,加入以下内容
Do you want the link to come up on demand, or stay up continuously? If you want it to come up on demand, enter the idle time in seconds after which the link should be dropped. If you want the link to stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no):
用缺省的no就可以了。
Please enter the IP address of your ISP's primary DNS server. If your ISP claims that 'the server will provide DNS addresses', enter 'server' (all lower-case) here. If you just press enter, I will assume you know what you are doing and not modify your DNS setup.
>>> Enter the DNS information here:
这里填你ISP的DNS地址,成都用61.139.2.69,辅助DNS成都可用202.98.127.32
PASSWORD
>>> Please enter your PPPoE password:
ADSL拨号密码这个东东。
搞定!爽爽,用#adsl-start 就可以开始拨号。如果连接成功系统会提示你:…….connect
用ifconfig看看。[root@localhost /root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:05:64:11:28
inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:347573 errors:0 dropped:0 overruns:0 frame:0
TX packets:40194 errors:0 dropped:0 overruns:0 carrier:0
collisions:35 txqueuelen:100
Interrupt:3 Base address:0x300
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
ppp0 Link encap:Point-to-Point Protocol
inet addr:61.157.91.227 P-t-P:61.157.91.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:20498 errors:0 dropped:0 overruns:0 frame:0
TX packets:19187 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
看见ppp0没有!
linux操作系统文章专题:linux操作系统详解(linux不再难懂)linux相关文章:linux教程
路由器相关文章:路由器工作原理
路由器相关文章:路由器工作原理
评论