LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 07-25-2012, 03:39 PM   #1
Kvbx4
LQ Newbie
 
Registered: Dec 2011
Distribution: Kubuntu Precise, Debian Lenny
Posts: 14

Rep: Reputation: Disabled
Question 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.
 
Old 07-26-2012, 11:25 AM   #2
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 54
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.
 
1 members found this post helpful.
Old 07-26-2012, 12:06 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
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.
 
1 members found this post helpful.
Old 07-28-2012, 01:08 PM   #4
Kvbx4
LQ Newbie
 
Registered: Dec 2011
Distribution: Kubuntu Precise, Debian Lenny
Posts: 14

Original Poster
Rep: Reputation: Disabled
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?
 
Old 07-28-2012, 11:10 PM   #5
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
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.
 
1 members found this post helpful.
Old 07-29-2012, 11:16 AM   #6
Kvbx4
LQ Newbie
 
Registered: Dec 2011
Distribution: Kubuntu Precise, Debian Lenny
Posts: 14

Original Poster
Rep: Reputation: Disabled
It looks like the writers of brctl anticipated that problem, because running
Code:
# 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.

Last edited by Kvbx4; 07-29-2012 at 11:17 AM. Reason: wording
 
Old 07-29-2012, 12:52 PM   #7
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 54
That was the problem I had when I tried that too. I ended up buing a 15 meter cable
 
Old 07-29-2012, 11:14 PM   #8
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
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.
 
Old 07-29-2012, 11:21 PM   #9
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
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
 
  


Reply

Tags
ethernet, network bridge, networking, port forwarding


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
STP in bridged connection snq Linux - Networking 1 11-24-2010 04:58 AM
Diagnosing network connections: Slow initial connection atp Linux - Networking 4 03-28-2010 10:26 PM
VmWare bridged connection with public ip andreaolivato Linux - Virtualization and Cloud 1 03-16-2010 08:05 AM
cannot set up network with suse vmware using bridged network config. lxvor Suse/Novell 1 02-08-2009 03:50 PM
Bridged networking intermittently drops network connection besson3c Linux - Networking 0 09-17-2008 07:31 PM


All times are GMT -5. The time now is 05:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration