aniketv
2006-09-30, 11:59 PM CDT
This is the first time I am writing a How-To , please excuse me for any mistakes...
So , getting back to business....
This small guide is to share your computer's Internet connection with Series 60 smart phone , over bluetooth. I did this setup using my Nokia 6630 smartphone. It will be more or less similar for other phones too.
To achieve this, we need an app called "Gnubox" sitting in your phone , and some Dund and Firewall settings in your Fedora machine , also not to mention a working bluetooth setup.
For starters , pair you phone with the computer , and set computer as authorised..
Configuring your Fedora box....
I] open /etc/bluetooth/hcid.conf in any text editor (as root)
comment the lines saying
auth enable;
encrypt enable;
by putting a # before them, it will look like this now...
#auth enable;
#encrypt enable;
2] Configuring DUND
create a file called /etc/ppp/peers/dun and write the following text in it:
460800
debug
ipcp-accept-remote
192.168.1.1:192.168.1.2
ms-dns REPLACE_WITH_THE_IP_ADDRESS_OF_YOUR_DNS_SERVER
lock
crtscts
noauth
defaultroute
3] Now We will configure the firewall,
Open /etc/sysconfig/iptables
we have to add three lines here , the added lines are marked here in bold italics..
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i ppp0 -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i ppp0 -j MARK --set-mark 0x9
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -m mark --mark 0x9 -j MASQUERADE
COMMIT
Here ppp0 is the interface created between the phone and the computer, if you use dilaup or any other ppp dialout like pppoe , then this interface will become ppp1 , as ppp0 will be your internet connection
now run following command as root
/sbin/sysctl net.ipv4.conf.all.forwarding=1
Now restart IPTABLES service by command...
/sbin/service iptables restart
4] Starting up DUND ..
run the following command
dund --listen --encrypt call dun
Good...now your PC is configured... Lets setup the phone.....
Installing GNUBOX
We will first install GNUBOX sis file on the phone.
You can get it from the gnubox site
Gnubox official site (http://gnubox.dnsalias.org/gnubox/)
Please read the gnubox website for good understanding of what gnubox does.
There are custom versions for some phones like 6630 , 3230 etc...install appropriate version for your phone...also sis files for certain models are in the "testing" directory of the gnubox download page , be sure to check that out for correct sis file for your phone
we will now configure the Gnubox utility
1]Download gnubox_(your phone model).sis to phone using kdebluetooth and install it.
( optionallly....Also download IpView20.sis and install.)
2]Then, create a directory called C:\Logs\Gnubox using FExplorer This will hold all Gnubox logs, which it will generate automatically if the dir exists. (If you don't want logs, just don't create it, or delete it)
3]Now, create a new internet connection on your phone.from
Settings->
Connections->
Access Points->
Options->
New access point->
Use default settings.
Just name it "Bt". I don't know if it is case-sensitive, but I'd suggest to keep it Bt, not bt or BT.
Set the data bearer to "GPRS" or "PACKET DATA"
You don't need to specify anything else there, no ip-addresses, no gateways, nothing else. Just set the security level to normal.
You will have to setup DNS servers here...from
Options->
Advance settings
Enter you ISp's DNS server addresses here (you can get them in the file /etc/resolv.conf)
Then save, exit
4]Launch Gnubox. Don't mind the fact if it says it can't find DialOutISP or such. It'll work anyway.
Under Gnubox commands, take Install->Create Records. If it gives a warning like "Already in use" or such, just don't mind it.
Exit Gnubox, and restart it. Now you should see access point Bt there.
All that is left to do is to issue the command 2box Bluetooth->LAN Access Server, choose your Linux box, and answer Yes when it asks about encryption. It will not work if you choose No.
Then just choose Install->set default AP to Bt.
You can exit Gnubox now.
There's a bug on some Nokia 6630. Usually after I reboot my phone, I have to run Gnubox and select Install->Set default AP to Bt to have it work correctly for anything else than Opera. Putty, Profimail etc just try to connect to GPRS otherwise. If you experience the same, try to set the default AP to Bt and check if it works.
Also, you can use Gnubox to bring the IF up, and then start IPView to check if you've got the correct IP address and DNS settings, and you can also try to ping either the Linux gateway (192.168.1.1) or any server on the net. It was very useful when I was trying to set Gnubox up.
Acknowedgements:
The guy here originally got it working..major credit goes to him ..
www.symbianos.org/yabbse/index.php%3Fboard%3D2%3Baction%3Ddisplay%3Bthreadi d%3D529+nokia+6630+gnubox+linux+how-to&hl=en&gl=in&ct=clnk&cd=1
But this page is inaccessible now due to some reason...I got it from Google's cache..
The stuff he mentioned to configure firewall is for Gentoo, which didnt work on my Fedora 5 initially, hence I did some modifications and got it working.
Here are a few more such pages
http://blogit.claymountain.com/sf/
http://wiki.foafrealm.org/TCPIPoverBluetooth
All have contributed to where I have got so far...
So people happy browsing from your phone!! :)
Please post your feedback here , and also if this method works for you, please report here with following details,
Your phone model
Your Bluetooth dongle model
Your fedora version
Your kernel version
Thanks a lot..
Disclaimer:I am not to be held responsible if your phone gives you trouble after you do this!!
So , getting back to business....
This small guide is to share your computer's Internet connection with Series 60 smart phone , over bluetooth. I did this setup using my Nokia 6630 smartphone. It will be more or less similar for other phones too.
To achieve this, we need an app called "Gnubox" sitting in your phone , and some Dund and Firewall settings in your Fedora machine , also not to mention a working bluetooth setup.
For starters , pair you phone with the computer , and set computer as authorised..
Configuring your Fedora box....
I] open /etc/bluetooth/hcid.conf in any text editor (as root)
comment the lines saying
auth enable;
encrypt enable;
by putting a # before them, it will look like this now...
#auth enable;
#encrypt enable;
2] Configuring DUND
create a file called /etc/ppp/peers/dun and write the following text in it:
460800
debug
ipcp-accept-remote
192.168.1.1:192.168.1.2
ms-dns REPLACE_WITH_THE_IP_ADDRESS_OF_YOUR_DNS_SERVER
lock
crtscts
noauth
defaultroute
3] Now We will configure the firewall,
Open /etc/sysconfig/iptables
we have to add three lines here , the added lines are marked here in bold italics..
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i ppp0 -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i ppp0 -j MARK --set-mark 0x9
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -m mark --mark 0x9 -j MASQUERADE
COMMIT
Here ppp0 is the interface created between the phone and the computer, if you use dilaup or any other ppp dialout like pppoe , then this interface will become ppp1 , as ppp0 will be your internet connection
now run following command as root
/sbin/sysctl net.ipv4.conf.all.forwarding=1
Now restart IPTABLES service by command...
/sbin/service iptables restart
4] Starting up DUND ..
run the following command
dund --listen --encrypt call dun
Good...now your PC is configured... Lets setup the phone.....
Installing GNUBOX
We will first install GNUBOX sis file on the phone.
You can get it from the gnubox site
Gnubox official site (http://gnubox.dnsalias.org/gnubox/)
Please read the gnubox website for good understanding of what gnubox does.
There are custom versions for some phones like 6630 , 3230 etc...install appropriate version for your phone...also sis files for certain models are in the "testing" directory of the gnubox download page , be sure to check that out for correct sis file for your phone
we will now configure the Gnubox utility
1]Download gnubox_(your phone model).sis to phone using kdebluetooth and install it.
( optionallly....Also download IpView20.sis and install.)
2]Then, create a directory called C:\Logs\Gnubox using FExplorer This will hold all Gnubox logs, which it will generate automatically if the dir exists. (If you don't want logs, just don't create it, or delete it)
3]Now, create a new internet connection on your phone.from
Settings->
Connections->
Access Points->
Options->
New access point->
Use default settings.
Just name it "Bt". I don't know if it is case-sensitive, but I'd suggest to keep it Bt, not bt or BT.
Set the data bearer to "GPRS" or "PACKET DATA"
You don't need to specify anything else there, no ip-addresses, no gateways, nothing else. Just set the security level to normal.
You will have to setup DNS servers here...from
Options->
Advance settings
Enter you ISp's DNS server addresses here (you can get them in the file /etc/resolv.conf)
Then save, exit
4]Launch Gnubox. Don't mind the fact if it says it can't find DialOutISP or such. It'll work anyway.
Under Gnubox commands, take Install->Create Records. If it gives a warning like "Already in use" or such, just don't mind it.
Exit Gnubox, and restart it. Now you should see access point Bt there.
All that is left to do is to issue the command 2box Bluetooth->LAN Access Server, choose your Linux box, and answer Yes when it asks about encryption. It will not work if you choose No.
Then just choose Install->set default AP to Bt.
You can exit Gnubox now.
There's a bug on some Nokia 6630. Usually after I reboot my phone, I have to run Gnubox and select Install->Set default AP to Bt to have it work correctly for anything else than Opera. Putty, Profimail etc just try to connect to GPRS otherwise. If you experience the same, try to set the default AP to Bt and check if it works.
Also, you can use Gnubox to bring the IF up, and then start IPView to check if you've got the correct IP address and DNS settings, and you can also try to ping either the Linux gateway (192.168.1.1) or any server on the net. It was very useful when I was trying to set Gnubox up.
Acknowedgements:
The guy here originally got it working..major credit goes to him ..
www.symbianos.org/yabbse/index.php%3Fboard%3D2%3Baction%3Ddisplay%3Bthreadi d%3D529+nokia+6630+gnubox+linux+how-to&hl=en&gl=in&ct=clnk&cd=1
But this page is inaccessible now due to some reason...I got it from Google's cache..
The stuff he mentioned to configure firewall is for Gentoo, which didnt work on my Fedora 5 initially, hence I did some modifications and got it working.
Here are a few more such pages
http://blogit.claymountain.com/sf/
http://wiki.foafrealm.org/TCPIPoverBluetooth
All have contributed to where I have got so far...
So people happy browsing from your phone!! :)
Please post your feedback here , and also if this method works for you, please report here with following details,
Your phone model
Your Bluetooth dongle model
Your fedora version
Your kernel version
Thanks a lot..
Disclaimer:I am not to be held responsible if your phone gives you trouble after you do this!!