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
|