10 de agosto de 2006

Speedy no Linux

Realizei um antigo sonho = usar a internet pelo Linux.

Desde que comprei o meu primeiro PC, tenho uma partição Linux junto com o Windows, mas sempre tive grande dificuldade em configurar o Linux. Ele exige, como dizem os especialistas, uma grande "curva de aprendizagem"... Só agora, mais de cinco anos depois, consigo usar a internet, e isto porque estou usando speedy!!! Usando modem de discagem é ainda mais difícil fazer a coisa funcionar.

Para o speedy usei um excelente tutorial retirado de http://www.infohelp.org/

Copio o texto aqui, para facilitar o acesso:

Configurando conexao PPPoE no Linux ADSL(Speedy)
Enviado em: 16/Jun/2003 por intrµder
Artigos

rp-pppoeAndei procurando na internet algum tutorial q explique corretamente como configurar PPPoE no Linux para conexao de Banda Larga como Speedy da Telefonica ou BrasilTelecom... todos q encontrei explicam corretamente como instala o rp-pppoe mas nenhum consegue explicar pq após conectar vc nao consegue navegar, mesmo setando os DNS's corretos, entao resolvi escrever este explicando corretamente a configuracao q deve ser feita...

:: Quais programas preciso?

Instalado o rp-pppoe:
- logue com privilegios de root com o comando: su root
- descompacte o pacote com o comando: tar -xvzf rp-pppoe-3.5.tar.gz
- entre no diretório q ele criou: cd rp-pppoe-3.5
- instale o rp-pppoe com o comando: ./go
- ou se preferir use os comandos: ./configure depois make e make install

Se vc é familiarizado com linux nao terá dificuldade nenhuma em instalar este programa...


:: Configuração

Após instalar o rp-pppoe se vc foi pelo comando ./go ele automaticamente abrirá o utilitario de configuracao se vc nao foi vc deve digitar o comando: adsl-setup

adsl-setup
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 default@sympatico.ca):

digite seu: nomedousuario@provedor.com.br

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):

digite o eth referente a sua placa de rede q esta conectada ao modem, geralmente é eth0

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):

recomendo digitar "no" e apertar
ou digite "yes" caso deseje usar discagem por demanda(conecta somente qdo o computador solicitar o uso de internet)..

DNS

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:

DNS primario de seu provedor: no caso do Speedy da Telefonica usaremos: 200.177.250.10

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:

DNS secundario de seu provedor: no caso do Speedy da Telefonica usaremos: 200.176.2.10

PASSWORD

>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:

Digite a senha q vc usa para se conectar a internet

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):

Escolha uma configuracao de firewall para sua conexao:
0 - firewall desabilitado
1 - recomendado para usuarios padrao
2 - computador q compartilha conexao a outros computadores da rede atravez de um Gateway

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes.

Digite:
yes
- se deseja q ele conecte automaticamente na hora do boot
no - se deseja conectar-se manualmente atravez do comando: adsl-start

** Summary of what you entered **

Ethernet Interface: eth0
User name: xxxxxx@provedor
Activate-on-demand: No
Primary DNS: xxx.xxx.xxx.xxx
Secondary DNS: yyy.yyy.yyy.yyy
Firewalling: STANDALONE

>>> Accept these settings and adjust configuration files (y/n)? y

Digite "y" para confirmar as configuracoes e salvar.

Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/resolv.conf
(But first backing it up to /etc/resolv.conf-bak)
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets



Congratulations, it should be all set up!

Type 'adsl-start' to bring up your ADSL link and 'adsl-stop' to bring
it down. Type 'adsl-status' to see the link status.

Seu adsl está quase configurado..

Andei vendo alguns tutorias e todos erram neste ponto..
O FAQ do RP-PPPoE deixa bem claro q vc nao deve usar o mesmo com sua placa de rede ativa, se usar vc vai conectar normalmente mas nao vai conseguir resolver nenhum DNS(navegar).

Entao vc deve desativa-la com o comando: ifconfig eth0 0.0.0.0
onde eth0 é sua placa de rede conectada ao modem.

:: Se vc usar um modem 3com
Edite o arquivo /etc/ppp/pppoe.conf com o comando: pico /etc/ppp/pppoe.conf
localize e descomente a linha: # PPPOE_EXTRA="-f 3c12:3c13 -S ISP"

Obs: caso vc use outro modem qualquer ou no seu 3com nao funcionar com esta linha descomentada, comente-a novamente...

[root@localhost ppp]# ifconfig eth0 0.0.0.0

Finalmente digite o comando: adsl-start

[root@localhost ppp]# adsl-start
. Connected!

Pronto vc esta conectado!

agora teste sua conexao com o comando: ping uol.com.br

[root@localhost ppp]# ping uol.com.br
PING www.uol.com.br (200.231.204.160) from 200.254.33.9 : 59(10) bytes of data.64 bytes from ortega.uol.com.br (200.231.204.160): icmp_seq=0 ttl=243 time=136.089 msec
64 bytes from ortega.uol.com.br (200.231.204.160): icmp_seq=1 ttl=243 time=159.902 msec

Para visualizar detalhes da conexao ativa use o comando: adsl-status

[root@localhost /root]# adsl-status
adsl-status: Link is up and running on interface ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:xxx.xxx.xxx.xxx P-t-P:yyy.yyy.yyy.yyy Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0

Para finalizar a conexao ativa: adsl-stop

[root@localhost /root]# adsl-stop
Killing adsl-connect (1560)
Killing pppd (1579)

Se preferir pode usar a versao GUI(interface grafica) do RP-PPPoE onde vc configura tudo em janelas com abaixo, para instalar o RP-PPPoE com a GUI ao invez do ./go use o comando ./go-gui

Mas somente use a GUI após fazer as configurações acima senão sua conexão nao pode funcionar corretamente.

:: Fontes:
-
Associação Brasileira dos Usuários de Acesso Rápido (www.abusar.org)
- Roaring Penguim RP-PPPoE FAQ (http://www.roaringpenguin.com/pppoe/)

Duvidas? por favor adicionem comentarios abaixo!

by intrµder (danilo francisco salles)
URL: http://www.infohelp.org

Nenhum comentário:

Pesquisa