CentOS下PPPoE撥號設置
1.查看并安裝撥號軟件:
[root@RedHat ~]# rpm -qa|grep pppoe
[root@redhat ~]# yum -y install rp-pppoe
rp-pppoe.i686 0:3.10-8.el6
2.查看adsl-setup命令所在位置:
[root@redhat ~]#whereis adsl-setup
adsl-setup:
或者直接搜索pppoe信息,yum search pppoe。
3.設置撥號:
[root@redhat ~]# pppoe-setup
首先,你會看到歡迎信息。
Welcome to the PPPoE client setup.? First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
然后要求我們輸入登陸名。
LOGIN NAME
Enter your Login Name (default root): (這里填寬帶連接的用戶名)
接著,要求我們選擇使用的網絡接口。我們這時候,填入我們剛剛設置的那個網卡。對于大多數只有一個網卡的朋友而言,默認eth0就可以了。
INTERFACE
Enter the Ethernet interface connected to the PPPoE modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0):
接下來,詢問的是,adsl連接以后,是否持續保持連接。或者是自動的斷開,在指定的時間(以秒數計算)內。多數情況下,我們希望手動的打開關閉連接。所以這里選擇默認的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): (no)
再下來,就是dns了。建議你輸入ISP的dns地址。
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. (server)
帳號密碼是必須,輸入兩次。密碼顯示風格和其他的地方一樣,不顯示在屏幕上。這個,我不知道改怎么填寫。太高深的問題了。希望你將你的答案和我分享。:P。
PASSWORD
Please enter your Password: (寬帶連接密碼)
Please re-enter your Password:
下面的設置,是表示是否允許普通用戶啟用/關閉 ADSL連接。默認是允許。
Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): (yes)
我們看下防火墻選項。這里提供的防火墻可以給你提供基本的安全保護。我不推薦你使用----你最好選擇“NONE”選項。無論是什么樣的用戶使用,我都建議你使用額外的工具來配置防火墻規則(iptables目前看來是一個非常不錯的工具)。
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)
Start this connection at boot time
是否在開機時,打開這個連接?
Do you want to start this connection at boot time?** (yes)
所有的配置信息填寫完成之后,系統將給出一個報告,完整的顯示出你輸入的配置信息。如果,你確信你輸入的配置信息是正確的,輸入yes寫入配置文件。輸入no放棄配置。
Summary of what you entered **
Ethernet Interface: eth0
User name: root
Activate-on-demand: No
DNS: Do not adjust
Firewalling: NONE
User Control: yes
Accept these settings and adjust configuration files (y/n)? (y)
Please enter no or yes (default no):
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.
測試撥號
現在,我們需要測試下我們的撥號是否配置正確了。
輸入ADSL-start撥號。一般情況下,ping www.linuxidc.com就可以了。
當然關閉連接的話,使用命令adsl-stop就可以了。