配置網卡
撥號需要將撥號的網卡設定為動態擷取ip。而動態擷取ip在機器啟動的時候,將會花費很長時間去擷取ip。所以,我們最好將網卡設定不啟動時不啟用。
設定網卡,使用命令netconfig可以方面的配置網路相關資訊。當然,也可以通過修改網卡的設定檔實現:
[root@www root]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
配置撥號軟體
安裝了撥號軟體,接下來,就進行設定,告訴pppoe怎麼撥號。啟動設定,通過下面這個命令:
[root@www root]# adsl-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
Enter your Login Name (default root):
接著,要求我們選擇使用的網路介面。我們這時候,填入我們剛剛設定的那個網卡。對於大多數只有一個網卡的朋友而言,預設eth0就可以了。
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 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):
再下來,就是dns了。我發現很多時候,pppoe都不能夠正確擷取dns資訊。我建議你輸入dns地址。這些資訊在isp的網站上一般都有公布。
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.
帳號密碼是必須,輸入兩次。密碼顯示風格和其他的地方一樣,不顯示在螢幕上。這個,我不知道改怎麼填寫。太高深的問題了。希望你將你的答案和我分享。: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):
我們看下防火牆選項。這裡提供的防火牆可以給你提供基本的安全保護。我不推薦你使用——你最好選擇“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): Start this connection at boot time
是否在開機時,開啟這個串連。
Do you want to start this connection at boot time?**
所有的配置資訊填寫完成之後,系統將給出一個報告,完整的顯示出你輸入的配置資訊。如果,你確信你輸入的配置資訊是正確的,輸入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)?
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.