LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-02-2005, 07:11 PM   #1
Golovko
LQ Newbie
 
Registered: Jul 2003
Distribution: Red Hat 9
Posts: 23

Rep: Reputation: 15
transparent internet/lan access through crossover through linux box


I have linux box A, running debian testing, which connects to a linksys router/firewall.

Linux box A has an extra nic. I would like to configure things so that I can take my laptop and a crossover cable, plug into the extra nic in the linux box, and have internet/lan access just as if I was plugged into my router, with an IP in the same subnet, able to browse samba/win workgroups, etc.

If someone could give me the general idea of what configuration is needed here I think I could hash out the details from the various network howto's.

Some infos:

Linksys Router
ip: 192.168.1.1
nm: 255.255.255.0

Linux server
eth0
ip: 192.168.1.50
gw: 192.168.1.1
nm: 255.255.255.0
eth1
?
?
?

I would like to be able to connect another machine to eth1, and be able to acess the internet and lan. I would like to have the machine offer its own services (freenx), which is why I think it needs an ip in the 192.168.1.x range.

Gol

Last edited by Golovko; 03-02-2005 at 07:41 PM.
 
Old 03-02-2005, 09:04 PM   #2
Gibsonist
Member
 
Registered: Mar 2004
Location: Meersburg (GER)
Distribution: Cygwin,RH 7.2 7.3, SuSe 6.4 8.2 9.1,TinyLinux, Debian Sarge, Knoppix 3.*, Knoppicilin, Knoppix STD
Posts: 191

Rep: Reputation: 30
Haven't done this for some time, and only played round with it using a Laptop as a "rogue" access point in some students lab, but was basically the same as you want to do...

try having a look at the bridging tools

basically you have to set up a bridge between eth0 and eth1,

could be that you can also solve it using ip-forwarding on your firewall (did that using SuSe on a clients machine - but don't know how to set it up by hand)

Hope these point you into some direction

here are some links that might be helpful.

http://www.tldp.org/HOWTO/Ethernet-B...ter-HOWTO.html http://bridge.sourceforge.net/howto.html
 
Old 03-03-2005, 05:55 PM   #3
Golovko
LQ Newbie
 
Registered: Jul 2003
Distribution: Red Hat 9
Posts: 23

Original Poster
Rep: Reputation: 15
thanks, my results

I used the second website listed, and its packages (well debian's):

apt-get install bridge-utils

ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0
brctl addbr brdg0
brctl addif brdg0 eth0
brctl addif brdg0 eth1
ifconfig brdg0 192.168.1.2 netmask 255.255.255.0
route add default gw 192.168.1.1 dev brdg0

Plugged in a machine to eth1, the rest of my network can ping/access it (through the bridging machine which connects to rest of network using eth0). If anyone knows of a better way to do this, or how to get this to start automatically, I'd appreciate info.

Gol
 
Old 03-04-2005, 02:38 AM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You need to install ip-masquerading and then do ip-forwarding. Do a google search internet sharing for your distro. You need to have the NIC's on different subnets.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can my Linux box be used as a transparent proxy on the LAN side of my router? Steve2001 Linux - Networking 5 02-01-2005 12:12 PM
Transparent access to linux machine on LAN Sinope Linux - Networking 2 09-27-2004 02:18 AM
Connecting Linux box to Internet through Windowx XP box over LAN pcd007 Linux - Networking 1 03-14-2004 10:02 AM
My Redhat Box suddenly stops internet access LAN Ok..HELP backbone Linux - Networking 8 10-24-2003 12:45 AM
configure linux to internet access in a LAN poncho4u Linux - Networking 5 08-15-2003 08:43 AM


All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
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