HOWTO? Using unix to forward traffic between two lans
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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)
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.