-   Linux - Newbie (
-   -   How do I forward connections to a computer on a bridged network connection? (

Kvbx4 07-25-2012 03:39 PM

How do I forward connections to a computer on a bridged network connection?
I have two computers connected together via Ethernet, and I've set up Computer 1 to share its WiFi Internet connection to Computer 2 using this guide. Everything works well, except that Computer 2 is being issued IP address by Computer 1 rather than a 192.168.1.x address by my wireless router, so Computer 2 and the other computers on my network (besides Computer 1) can't access each other. Is there a way I can set up Computer 1 so that connections made to a certain port on it will be forwarded to Computer 2?

Many thanks in advance.

segmentation_fault 07-26-2012 11:25 AM

That is definitely not a guide for network bridges. It just tells you how to set up your network card to use auto (dhcp) settings, using a specific GUI tool of a specific Desktop Environment. You need a package called bridge-utils, and use brctl to set up a bridge in Linux.

scheidel21 07-26-2012 12:06 PM

This tutorial on the Ubuntu forums is actually how someone bridged their WiFi and Wired networks, this is more likely to get you to your goal. The tutorial you used turns the machine into a router, not a bridge.

Kvbx4 07-28-2012 01:08 PM

Okay, I found this article in the Debian wiki describing how to set up a network bridge via brctl. Just so I'm fully clear before I try this, it will allow my router to see both computers and issue them each a unique IP address, correct?

scheidel21 07-28-2012 11:10 PM

A bridge allows all members to see the traffic. The only issue I see as possible is your wireless refusing to transmit traffic that originates from a different MAC addresses. I have had this happen and ended up having to use a proxy server on the machine I tried to use as a bridge. But that was also with an old chipset.

Kvbx4 07-29-2012 11:16 AM

It looks like the writers of brctl anticipated that problem, because running

# brctl addif br0 eth0 wlan0
yields the message "can't add wlan0 to bridge br0: Operation not supported." Searching around on forum posts indicates that the MAC address authentication issue is the reason for this.

I think I'm just going to get a wlan card for Computer 2. That way I won't have to have both computers on to access the network from it.

Thanks anyway for the assistance.

segmentation_fault 07-29-2012 12:52 PM

That was the problem I had when I tried that too. I ended up buing a 15 meter cable :)

scheidel21 07-29-2012 11:14 PM

It can be done though because I have done it, and the article you linked to uses ebtables to get around the MAC address issue. I don't know why it won't bridge them.

scheidel21 07-29-2012 11:21 PM

After reading a couple posts you need to change the operating mode of your wireless card. Your wireless will not obtain an IP address, ethernet interface should. Look at hostapd this would turn the wireless card into an AP essentially and allow you to bridge it. That is provided the chip set supports the proper operating mode

All times are GMT -5. The time now is 06:53 AM.