bluetooth pan bridging problem
Hi folks!
I have a problem, which drives me crazy. I want to establish a personal area network with two participants via bluetooth. One is connected to the internet, and I want to be able to go online on the other too. So, what I have is a working network configuration (at least it looks like it is). I can ping both pcs from each other and I can establish ssh connections. What I still can't is going online with the pc without internet (with the other one it's possible of course) The commands I use are: Code:
brctl addbr pan0 Code:
bridge name bridge id STP enabled interfaces So I hope there's someone out there, who can help me with this. Thanks in advance |
Assuming that your internet connection has an ip address from a different range to those used for the bluetooth connection, the bridge in this setup allows you to add the "temporary" bluetooth interfaces bnep0, bnep1, etc to a fixed interface pan0.
The bluetooth connection will have an IP address at either end (192.168.192.1 on the internet side). If you run "route" (as root) on the non-internet side you should see the bluetooth subnet (192.168.192.0) routing to the bnep0 interface, hence you can ssh to that IP. The "default" route should be set to use the bnep0 interface as well. (as root) $ route add default gw 192.168.192.1 On the server side, it must act as a router to the internet. The "default" route there should be the internet device (eth0/ppp0). In order to get the reply packets back over bluetooth, you will have to do ip masquerading using iptables. (as root) $ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE (change eth0 to whatever your internet is on) You must also make sure that ip_forwarding is turned on. This is done by setting a value in proc $ echo 1 > /proc/sys/net/ipv4/ip_forward but should be set more permenantly in the network startup file, this may be /etc/network/options or the /etc/init.d/networking files (I have the latter in Debian) |
All times are GMT -5. The time now is 05:03 AM. |