LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-30-2006, 04:34 AM   #1
g33sp0t
LQ Newbie
 
Registered: Apr 2004
Location: San Diego Ca/Memphis Tn
Distribution: gentoo
Posts: 13

Rep: Reputation: 0
HOWTO? Using unix to forward traffic between two lans


I have two lan's, each with their own inet connection(s), and routers. I.E. their own dhcp, dns ectra. (see link for layout. It's a 15k gif)

What i NEED is to be able to ping/interact, ectra between the two lan's.

http://tcoc.hopto.org:180/pub/pictur...ullnetwork.gif

i.e i want to be able to ftp/ssh/whatever from say, "blackhat" to "pileforce"

Via sandy.
I just threw in a gigabit nic and plugged her into "tlp router"
the 100 meg connection on sandy is eth0, the gig is eth1, squid, apache and dns cache are bound to eth0.

So i need good advice as to where i can find more specific information, and perhaps some example configurations.

My searching has led me to ethernet bridging, witch i am not after, as i want the routers to do the dhcping, ectra. I was thinking i could add routes to the routers, to point traffic to sandy based on destination, and in turn have sandy point traffic to the real destination. I do NOT want masquerading.

Anyway, I welcome any and all advice.
Thanks.
:fixed link:

Last edited by g33sp0t; 05-30-2006 at 09:20 PM.
 
Old 05-30-2006, 08:58 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
First, your link is broken.

Second, all you need to do is add correct routes and make sure the firewall rules don't filter you out.
 
Old 05-30-2006, 09:22 PM   #3
g33sp0t
LQ Newbie
 
Registered: Apr 2004
Location: San Diego Ca/Memphis Tn
Distribution: gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
link and whatnot

First, i fixed the link, sorry about that.
Second, could you point me to some guide that will teach me how to do that.
 
Old 05-31-2006, 01:47 AM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
First*, I think you mixed up sandy's ifaces in the diagram (since inet0 is primarily GigE and inet2 is primarily 100Mbit).

Second, I can't seem to see why you want to use sandy at all (unless thisisalan switch is running short on interfaces).

What happens if you take sandy out of the picture and hook tlp router directly into thisisalan switch? Ideally, the routing will be self-explanatory to the routers (the obvious place for any traffic destined to 192.168.1.0/24 is through 192.168.1.1, and vice versa). If not, you can just change the kernel routing table explicitly for each.

The `recommended reading' all depends on your level of experience with linux and networks. In any case, see the manpages of:
route
ifconfig
ip (for some reason, this is starting to become more ``correct'' than the other two)

If you are starting out, see http://tldp.org/HOWTO/Networking-Overview-HOWTO.html.
If you are experienced, see http://tldp.org/HOWTO/Adv-Routing-HOWTO/index.html.


*All new posts to this thread must begin like this.
 
Old 05-31-2006, 02:23 AM   #5
g33sp0t
LQ Newbie
 
Registered: Apr 2004
Location: San Diego Ca/Memphis Tn
Distribution: gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
The diagram is accurate, to address the passable gig and 10/100 mix up allegation.
The reason i thought sandy would be best able to route between the lan's is due to it's physical location, the fact that it's a 24/7 machine, and it's running gentoo, the distro that i am most familiar with.

What happens when i plug tlp router into thisisalan switch is i drop a internet connection.

I dont want the tlp network to do buisness via thisisalan's inet connection.
But i do want to be able to use both networks without having to dual hone everything.

I have recently added several services to the tlp lan, witch i very much would like to be able to acess without going through the internet, witch is what i have been doing for years.

I will be more descriptive, "sandy" "tlp" "pileforce" "bigpurple" are all headless, blackhat has pvr/home theater pc duties, goliath and phantom are gaming rigs.

Anyway, want to thank you for your assistance, i was hoping that there was someone out there who had done something similar, and who would know where i could find specific information on a similar configuration.
 
Old 05-31-2006, 01:38 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by g33sp0t
What happens when i plug tlp router into thisisalan switch is i drop a internet connection.
All I was saying is that you can plug tlp router into thisisalan switch and get it to work correctly, you just have to modify the routing tables. Read up () a little on routing tables to see how they work in linux. This way you don't have to worry about the extra machine. Instead, sandy can be like any normal machine on the 192.168.0.0/24 network.

You can prevent tlp router from trying to access the internet through inet0. The `default route' for tlp router should point to a router from your inet1 ISP. Likewise, the `default route' for thisisalan router should point to a router from your inet0 ISP. On tlp router, a destination of 192.168.0.0/24 should point to 192.168.0.1. On thisisalan switch, a destination of On the thisisalan router, the a destination of 192.168.1.0/24 should point to 192.168.1.1. Finally, the DHCP servers running on tlp router and thisisalan router should tell all clients to use them as the default route (I assume this step is already in place). Also, if you are running any DHCP clients on the router (to get an IP from your ISP), make sure they only listen on the interface connected to the ISP (so they won't get confused by each other).

You can see and manipulate the routes on your routers using the `route' command. When you plug tlp router into thisisalan switch, don't just tell us that you lose an internet connection, please print the output of running the command
Code:
# route
on each router.
 
  


Reply



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
How can I forward all traffic to 10.10.0.10:80 to 10.10.0.20:8080 using IPtables? abefroman Linux - Networking 1 10-06-2005 03:19 PM
iptables forward traffic alaios Linux - Networking 1 09-28-2005 04:43 AM
cant see .forward file in home directory >> mail forward/copy steve_babbage Linux - Newbie 0 03-02-2004 06:25 AM
Trying to forward web traffic through firewall w/ IPTABLES ShinySteelRobot Linux - Networking 6 08-17-2003 05:43 PM
LANs andymay27 Linux - Networking 1 10-14-2001 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:14 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
Open Source Consulting | Domain Registration