LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   can't share internet connection via bluetooth (https://www.linuxquestions.org/questions/linux-networking-3/cant-share-internet-connection-via-bluetooth-555099/)

kuni 05-19-2007 04:54 AM

can't share internet connection via bluetooth
 
Hello,
I am trying to connect my iPAQ PDA (running Familiar linux) to internet through a laptop (Ubuntu Feisty). The connection via USB works fine (usb0 interfaces), but I am stuck on bluetooth, where the laptop won't forward IP packets from bnep0 interface through eth0 to the outside world.
Here is some info and what I did:
laptop: eth0 - 192.168.0.164 (connected to router which is 192.168.0.1)
bnep0 - 192.168.1.1
PDA: bnep0 - 192.168.1.2.

I set the connection using pand:
laptop: pand --listen --role NAP --master -autozap
PDA : pand --connect 11:11:11:11:11:11 --service NAP --autozap
I tried various options for pand, none works.
I brought both interfaces up using these settings in /etc/network/interfaces:
laptop: iface bnep0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
PDA: iface bnep0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
I have enabled IP forwarding and masquerade:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.1.2 -j MASQUERADE

I can ping both devices with each other, but PDA's pinging won't get outside the laptop (in fact, I can ping 192.168.0.164 [laptop's eth0] but not 192.168.0.1 [router]).

I don't think that problem is in routing table, since the exact same setting works when pda connected through USB (usb0 interface).

It behaves like the laptop is not able to "convert" HCI packets to ethernet packets. But since I don't know anything about this topic I ask on this forum. Any help is appreciated. Thank you, kind regards Kuni

Mara 05-19-2007 05:03 PM

The iptables line is probably one of the longer iptables script you have. You may be dropping the packets comming from bnep0. Check if you have rules that base on the interface name, not source address. They may cause the problem you have.

kuni 05-21-2007 07:36 AM

There are no other rules in the iptables; the default policy should be "allow all" so I it obviously isn't a problem of iptables. Thank you for your reply anyway!


All times are GMT -5. The time now is 05:09 AM.