-   Linux - Networking (
-   -   can't bridge ppp0 interface (

a550ee 07-14-2007 11:27 AM

can't bridge ppp0 interface
I have ubuntu feisty workstation. I access internet through ppp0 interface. Also I access bluetooth-enabled PDA via PAN through bnep0 interface.
I want to share internet connection with PDA. Is it possible to do so bridging these interfaces with brctl?
bnep0 can be added to bridge but on adding ppp0 I get error:

can't add ppp0 to bridge pan0. Invalid argument

blackhole54 07-16-2007 01:54 AM

I'm no guru on bridging, but I don't think you can bridge dissimilar devices.

I think what you want to do is simply forward an ip connection. This involves enabling ip-forwarding in the kernel and providing a default route in the routing table so your PDA can find the internet. It also involves MASQUERADING in the nat table's POSTROUTING chain (using iptables). You will also have to provide your PDA device with the addresses of your ISP's DNS servers.

The routing table is probably set up correctly when you establish the ppp connection. This should also set up /etc/resolv.conf with the correct DNS addresses. You need to get these addresses to you PDA either manually, or by setting up a DHCP server. (Warning: I have no experience with a PDA.)

For the rest you could:


iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE
sysctl -w net.ipv4.ip-forward=1

You could add this to your rc.local file, or if you already have a firewall setup, you could merge the iptables command into that.

acid_kewpie 07-16-2007 03:07 AM

in theory you can bridge them, but i believe that the standard ppp drivers do not support the correct protocol, i.e. BCP, by default. you would need an updated kernel and pppd patched to provide this.

All times are GMT -5. The time now is 10:03 AM.