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 10.42.0.70 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. |
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.
|
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.
|
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?
|
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.
|
It looks like the writers of brctl anticipated that problem, because running
Code:
# brctl addif br0 eth0 wlan0 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. |
That was the problem I had when I tried that too. I ended up buing a 15 meter cable :)
|
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.
|
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 http://linuxwireless.org/en/users/Documentation/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 https://help.ubuntu.com/community/WifiDocs/MasterMode
|
All times are GMT -5. The time now is 08:57 AM. |