版主
无线哥
- 注册时间
- 2009-2-13
- 金币
- 6756 个
- 威望
- 115 个
- 荣誉
- 32 个
累计签到:2 天 连续签到:0 天 [LV.20]漫游旅程
|
本帖最后由 fs290725630 于 2009-5-15 13:03 编辑
大家好,今天我们看看在BT系统下怎么通过有线网络PPPOE拨号上网,这对于硬盘启动BT系统的破解朋友应该有所帮助,本人测试BT版本为BT3.6.1,其他BT系统与LINUX应该都是可行的,有测试的朋友跟帖说明下有无区别。
好的!下面进去主题。
我们需要下载rp-pppoe-3.10.tar.gz
下载地址:http://www.roaringpenguin.com/products/pppoe
我们将rp-pppoe-3.10.tar.gz 复制在BT目录下,这里我复制到/usr/src
打开解压
cd /usr/src
tar -zxf rp-pppoe-3.10.tar.gz
我们看见/usr/src目录下多了个rp-pppoe-3.10文件夹
cd rp-pppoe-3.10
cd src
./configure
make
make install
编译:注意目录
./go
调用 pppoe-setup 进行设置
pppoe-setup
进入设置状态
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
LOGIN NAME
填入adsl账号
Enter your Login Name (default root):
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 ethX, where 'X' is a number.
(default eth1):
选择默认NO
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):
填写DNS服务器地址,默认有2个,一主一备,我这的是202.102.192.68,写一个也行
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic 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: 202.103.24.68
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 202.103.44.150
填写ADSL密码,要填写2次
PASSWORD
Please enter your Password:
Please re-enter your Password:
用户控制,选NO,只允许管理员管理
USERCTRL
Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): no
防火墙设置,选择0,不开启防火墙,否则麻烦一大堆
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 0
选择系统开机时默认连接ADSL
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no):yes
** Summary of what you entered **
Ethernet Interface: eth1
User name:
Activate-on-demand: No
Primary DNS: 202.102.192.68
Firewalling: NONE
是否结束配置,选择Y。
Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/resolv.conf
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(But first backing it up to /etc/ppp/chap-secrets.bak)
(But first backing it up to /etc/ppp/pap-secrets.bak)
Congratulations, it should be all set up!
配置结束!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.
拨号:pppoe-start
出现connected!表示连接成功!
关闭:pppoe-stop
查看状态:pppoe-status
系统给的默认命令:
拨号:/sbin/ifup ppp0
关闭:/sbin/ifdown ppp0
查看ADLS状态:/sbin/adsl-status
不同的版本命令有些不一样,具体可以自己安装的时候注意看一下!
再搞定共享:
vi /etc/sysctl.conf
找到这一段
Controls IP packet forwarding
net.ipv4.ip_forward = 0
将"0"改为 "1"后 存盘退出
设置iptables 共享上网.
# iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -j MASQUERADE
其中192.168.1.0是内部网的网段.
也可以把这一行放到/etc/rc.local, 下次开机就可以自动运行。以下是我的/etc/rc.local文件
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -j MASQUERADE
存盘退出后重启就OK了。
开机自启动
为了使Linux服务器能够自动拨号,执行下面步骤。
1)chkconfig --add pppoe
注意事项:
1。如果pppoe-start 不能建立连接,那么rp-pppoe的设置有问题;
试着在终端中输入ifconfig看看ppp0的参数;
2。如果pppoe-start 能够建立连接,浏览器无法上网,那么这个是路由设置的问题;
输入route看看有没有默认路由,没有的话添加一条:
route add -net 0.0.0.0 netmask 0.0.0.0 ppp0
记住网卡要起来!
好了,我们来看看结果,ping NDS
ping 202.102.192.68
结束!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ok~~~~
欢迎拍砖指导!
代码内容部分来自互联网。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
评分
-
2
查看全部评分
-
|