' m/ H- y# B& K- M- N; C# L+ X. m[root@LinuxSir02 root]# adsl-setup5 ?6 W2 U$ x; d, t6 \
8 B( F7 n# ^ i# E% L7 {; f
Welcome to the ADSL client setup. First, I will run some checks on/ ^/ Y2 V9 v; k0 e7 a% X
your system to make sure the PPPoE client is installed properly...1 |0 K) p j: Q0 X. G/ [+ z# x
* v$ H0 z+ w' Q- i
3 t9 C ~, R6 }6 m5 j1 ^& W' s( |: iLOGIN NAME! v. h' a6 h7 z. y; \
' q6 A! S5 t! X# }: fEnter your Login Name (default root): ADSL提供商给的用户名,写在这里 * ? y7 ]; H1 E5 U l" w5 k, q2 }* D# ~: t
INTERFACE b9 Z6 X! a6 }; j, t
8 c- E+ I7 e+ a
Enter the Ethernet interface connected to the ADSL modem ; K, _) P7 f8 t0 gFor Solaris, this is likely to be something like /dev/hme0.. S; D" `6 g& v! h: d& s0 z' t% D
For Linux, it will be ethX, where 'X' is a number. ; a' Z6 o1 \% i0 C8 f(default eth0): eth0这是ADSL通过第一台机器的第一张网卡eth0提供上网- Y# x4 H" a' d7 M& f, u5 [- ]
' m" _- ^" a) C; z
5 ^2 S! b0 P2 o% q$ c% Y0 S
Do you want the link to come up on demand, or stay up continuously?0 J# u0 e3 q) i4 b4 f; [
If you want it to come up on demand, enter the idle time in seconds, O- v% k- o m. w
after which the link should be dropped. If you want the link to 7 _# I1 [- C, K D9 _stay up permanently, enter 'no' (two letters, lower-case.)+ \6 A$ h! s- y* k" B6 m' A
NOTE: Demand-activated links do not interact well with dynamic IP ! T' @/ z/ N0 }; ?addresses. You may have some problems with demand-activated links. 0 d8 p" G' p+ Q7 V2 d. _6 ~Enter the demand value (default no):在这里按一下回车就行了。 2 t$ |: ^# \4 P; |/ L0 D" l' E ; w* G& F8 b* k7 l vDNS 3 k3 y4 O! |. E3 l6 _ ' D+ A F% H- RPlease enter the IP address of your ISP's primary DNS server.4 ?9 d% [0 \7 R4 s8 X
If your ISP claims that 'the server will provide dynamic DNS addresses', 6 n7 r+ H; V- {. f, w0 L& B6 e+ M/ ^enter 'server' (all lower-case) here. 9 s! @9 p" J+ }4 UIf you just press enter, I will assume you know what you are, X" x- V( k5 P O. E% L
doing and not modify your DNS setup. " v( i% w {/ `, w6 l, TEnter the DNS information here: 202.96.134.133这是DSN,最好用你本地电信给的# c$ P: N/ D9 y
Please enter the IP address of your ISP's secondary DNS server., n- A5 Q$ S( U: i, x
If you just press enter, I will assume there is only one DNS server. 8 p% U( X5 |2 H7 v# k) wEnter the secondary DNS server address here: 202.96.168.68这是第二个DNS,也是电信给的。 9 D, s: \; v5 G2 H* u/ |# I/ l$ m" i: w2 J0 o$ }. K
PASSWORD 8 P: J: \) f& c9 q5 `* D6 \" f# v, z# i
Please enter your Password:在这里把ADSL提供商给的密码写上 / B8 i3 o! C |Please re-enter your Password: 6 I0 R1 l L( r* R; a/ Z 0 d/ h' H0 ^3 z$ {USERCTRL ; o: a" ]/ z- J- A# c$ c4 ~" \5 B8 `2 b' K
Please enter 'yes' (two letters, lower-case.) if you want to allow 6 a. q6 F+ J$ p8 s @$ w' }normal user to start or stop DSL connection (default yes): yes . ] l* y' P- h! j. ^( s* g6 o" z: [% a, N& \+ a0 P
FIREWALLING 8 c( z' X$ m, x' @5 |& w6 F: U ~! G. d# o0 s4 x
Please choose the firewall rules to use. Note that these rules are m$ K) p8 _$ S: |4 uvery basic. You are strongly encouraged to use a more sophisticated i$ H1 e8 R p0 U9 R+ _$ c
firewall setup; however, these will provide basic security. If you/ d0 H! P8 E, {* X* X9 [
are running any servers on your machine, you must choose 'NONE' and3 D Y& d q. I! a. [! p( r* n
set up firewalling yourself. Otherwise, the firewall rules will deny2 I4 g9 ~3 s$ o* E+ a% f. k
access to all standard servers like Web, e-mail, ftp, etc. If you . J3 I8 e0 k- b% g$ ^7 c ]& ~are using SSH, the rules will block outgoing SSH connections which2 x! O! U5 t2 E) p' o
allocate a privileged source port. 7 e; W3 p8 k5 q% u0 O/ ?" X# ^. `# t: ^, l: D0 E: u" _+ q& a
The firewall choices are: + E" q# u/ u" A: @# ]0 - NONE: This script will not set any firewall rules. You are responsible. V6 `/ @" e0 `0 J$ y! W
for ensuring the security of your machine. You are STRONGLY! e' B$ j4 J- |' m5 ?' U( ^
recommended to use some kind of firewall rules.0 S- {, `7 R+ W# s* k
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation) B. Q# u3 P( ~/ }: |( ^! A4 w# x
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway 6 ]$ b6 N( A% Vfor a LAN2 p0 {7 y8 A% \% i+ p; W: J
Choose a type of firewall (0-2): 21 c% W9 P- E- e* z z) Z
: y8 r2 X, @1 P9 wStart this connection at boot time ; w& p. D) G" c( L, v9 C/ z C) M ) [( s6 i2 b( s9 G( YDo you want to start this connection at boot time?- I/ i+ f8 q) s; o$ n; _& i# E/ a# Z: I
Please enter no or yes (default no):yes, W s2 P' R6 W/ T5 o
8 s$ ?, {. ?- y; B( B& `** Summary of what you entered **2 |3 F! K4 E3 I2 y( ^( K! n
8 R) e# A* U1 J' M0 u* C
Ethernet Interface: eth0& s( S! Z3 m6 ~ Q; S: r
User name: ADSL用户名3 `+ f l8 o. [, Q2 q" S
Activate-on-demand: No . u) y! a" F( U1 tPrimary DNS: 202.96.134.133 7 p$ Y( E$ P* U. s$ w8 K& lSecondary DNS: 202.96.168.687 Z4 t8 r) n7 v: R! z
Firewalling: MASQUERADE 5 {7 B7 A4 U( F9 p0 CUser Control: yes- ^ t7 h+ g" ^! ?9 s( h! n! p
Accept these settings and adjust configuration files (y/n)?y9 o- f9 y/ O2 J$ ^: m8 v
& T, P) s9 n' A& Q# X) p" p8 D: o! w
$ C3 x$ N% H7 g5 Y3 G7 Q
三、在/etc/rc.d/rc.local中加入如下: 8 r: }4 L$ I) s8 g0 R; ^2 t1 b / v' W; R# \9 Z" ?$ p6 c3 P- V6 Necho 1 > /proc/sys/net/ipv4/ip_forward # a& M5 m% Y, y) oiptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE 7 p7 o% b, ~" Y; R
6 Y1 l* D9 R" J% c3 ^2 g8 _
四、重新启动机器。就OK了。这有多简单