Oct
13
2009
Éverton Arruda
I’ve recently bought my PlayStation 3 (FInaly!!!!!) and was thinking of a way to connect my PS3 to the internet using my 3G BroadBand internet connection, which is provided by the brazilian Phone Company Claro. The only thing that came to me was: IpForward.
So i did this:
1 – Connected my Notebook to the 3G Broadband:
Just connected as I normally do.
2 – Connected my PS3 to my Notebook:
Created a LAN between them, through my notebook’s interface eth0.
I configured my PS3′s network connection as follows:
In the PS3′s main menu go to Settings > Network Settings > Internet Connection Settings, then, go through this sequence of choices: custom, wired connection, auto-detect, manual (the ip settings are shown bellow), automatic, do not use (in my case i don’t use any proxy), enable.
The Ip Settings are:
Ip address: 192.168.0.2
Subnet mask: 255.255.255.0
Default Router: 192.168.0.1 (This is my Notebook’s Ip)
Primary DNS: 208.67.222.222 (This is Claro’s primary DNS Server)
Secondary DNS: 208.67.220.220 (This is Claro’s secondary DNS Server)
3 – Set Notebook to IpForward
I found a Script in the internet that does everything it needs to ipforward, all i did was add the final line, which sets a fixed ip to the interface that is connected to the LAN. I don’t remeber who wrote the script, but the credits are his/hers.
All you have to do now is save the script bellow and run it everytime you want to connect your PS3:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| #!/bin/sh
# Basic firewall and forward/masquerade setup
PATH=/usr/sbin:/sbin:/bin:/usr/bin
# Delete/Flush old iptables rules
iptables -F
iptables -t nat -F
iptables -X
# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 |
If you did as it is described in here, then it should work just fine.
Just for the record, I’m sing BrDesktop Lenny Linux as Operating System (a Debian Pure Blend).
Note: Everytime I try to test the connect through PS3, my notebook loses the ip 192.168.0.1 and starts o search for another one, breaking the connection between them. So i recommend you not to use that feature when using the connection method described in here.
:wq
no comments | tags: 3g, Debian, ipforward, Linux, modem, PS3 | posted in HowTo, Linux, Planet INdT, Planet PSL-AM
Jul
28
2009
Éverton Arruda
Comprei, recentemente, o modem 3G da Claro, fabricado pela Huawei, modelo E226, e infelizmente não consegui fazê-lo funcionar de cara no Debian Lenny, mas após alguns minutos de pesquisa a solução apareceu!
A solução que descreverei também funcionou do Ubuntu, nas versões Intrepid Ibex e no Jaunty Jackalope.
Você precisará do pacote wvdial, instale-o com o comando:
1
| # aptitude install wvdial |
Para saber mais detalhes sobre o pacote acesse este link: http://packages.debian.org/lenny/wvdial.
Após isso você deverá criar um arquivo de configuração para o wvdial, chamado wvdial.conf, com o seguinte conteúdo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| [Dialer Defaults]
Carrier Check = off
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = claro
Ask Password = 0
Check Def Route = 1
Phone = *99***1#
Idle Seconds = 0
Modem Type = Analog Modem
Stupid Mode = 1
Compuserve = 0
Baud = 460800
Auto DNS = off
Dial Command = ATDT
Modem = /dev/ttyUSB0
ISDN = 0
Username = claro
[Dialer claro3g]
Stupid Mode = on
Password = claro
Auto Reconnect = off
Username = claro
Phone = *99***1# |
conecte-se com o comando:
E você estará conectado, mas ainda não será possível acessar qualquer endereço da internet, devido aos endereços dos servidores DNS estarem incorretos, então você deve adicionar as seguintes linhas ao arquivo /etc/resolv.conf:
1 2
| nameserver 208.67.222.222
nameserver 208.67.220.220 |
Agora você poderá acessar a internet normalmente.
No Ubuntu, a configuração foi mais fácil devido à versão do network-manager, ao conectar o modem ao computador, este foi reconhecido normalmente e um assistente de configuração foi aberto automaticamente. Tudo o que tive que fazer para acessar a internet foi adicionar as linhas acima no arquivo /etc/resolv.conf após estar conectado, e deve ser após estar conectado porque o network-manager sobrescreve o arquivo /etc/resolv.conf toda vez.
Você pode, também, adicionar os endereços dos servidores DNS nas configurações da conexão da Claro no network-manager fazendo o seguinte: Sistemas > Conexões de Rede > Banda Larga Móvel > Editar conexão da Claro > Configurações IPv4 e adicionar os IPs 208.67.222.222, 208.67.220.220 na linha dos Servidores DNS e aplicar as alterações, assim você não terá que adicionar aquelas linhas no /etc/resolv.conf toda vez que conectar.
:wq
1 comment | tags: 3g, claro, HowTo, Linux, modem | posted in HowTo, Linux, Planet INdT, Planet PSL-AM