LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-03-2004, 03:04 PM   #1
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Rep: Reputation: 15
Linux Gateway+Two NICS+Router+HOWTO


Hi I am trying to set up my Linux server as a gateway. I have two Network Card in the Linux server. The first eth0 I am using for my internal netowk, the second network card eth1 I am using for the connection with the Router. The Router manages the internet. The router owns the public IP and manages NAT. I just need to thel my Linux server to route packets from etho throught eth1 to the Router.

eth0 - 10.40.0.10
eth1 - 10.40.0.9
Router - 10.40.0.1

How and what?

You must be aware that both NICK must be accessible from the hub!

All The Best
 
Old 09-03-2004, 03:18 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Check the IP Masquerading HOWTO at the Linux Documentation Project. It should tell you everything you want to know. If you are using a 2.6 kernel, follow the directions for 2.4.
 
Old 09-03-2004, 03:24 PM   #3
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
what is the idea? I dont know what to search for!
 
Old 09-03-2004, 03:38 PM   #4
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
You will need to read the full HOWTO, it goes though how to set it up linux so it will "forward" the packets to and from the Internet network and how to set up the other machines to use the "Gateway" (the machine you set IP Masquerading on)

Andrew
 
Old 09-03-2004, 03:45 PM   #5
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
I really don't have the time to read so much text...If you really don't want to help, then do not post such answers. If comeone can give me fair answer how and what I am gonna apriciate it..thanx

All tHe Best to the good people of the linux community
 
Old 09-05-2004, 01:23 PM   #6
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
anyone?
 
Old 09-05-2004, 03:08 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Do you really need to have both subnets (router + server and server+other machines) in one network? I'd keep router and ethX (the one conected to router) as they are and change the rest of IPs to something like 10.0.1.x (and change both netmasks to 255.255.255.0).
 
Old 09-06-2004, 01:42 PM   #8
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
I have had that configuration u suggested me, but is it actually possible to do it on the way that you have tow NICs in the same subnet - the same ip naming?
 
Old 09-06-2004, 02:29 PM   #9
reetep
Member
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 122

Rep: Reputation: 15
may i ask why you want to route everything through your linux box?

As you said yourself, the router handles NAT. Unless you're setting up a proxy server or something it doesn't sound like you need it....
 
Old 09-06-2004, 02:47 PM   #10
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
I have a cisco 805 router which doesnt support bandwidth limiting. I want to limit my users to 90MB a day. You get the point, and on the linux server I have got the proxy also.
 
Old 09-06-2004, 02:51 PM   #11
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Original Poster
Rep: Reputation: 15
And on the linux server, you have so much posibilities then on a cisco 805 router. From all sort of caching options, control, we interfaces for users, I like that kind of chalenge to develop my own network system...heh
 
Old 09-07-2004, 12:29 PM   #12
reetep
Member
 
Registered: Oct 2003
Location: UK
Distribution: Debian
Posts: 122

Rep: Reputation: 15
Ok I understand - just didn't want to see you going up the wrong path believing you need the linux box if all you wanted was NAT.

I have done something similar to what you want - I have a masquerading box with a firewall, proxy (squid) and an internl webserver. Don't be put off by the length of the ldp massquerading howto - it deals with three cases simultaneously: 2.0 kernel, 2,2 kernel and 2.4 kernel, each different. It also contains a fair bit of troubleshooting help at the end. If you cut it down to a 2.4 kernel document it's very short. If you don't need to recompile the kernel, it takes ten minutes. I really think you should go there; I found it to be a very useful document indeed.

I haven't seen the bandwidth limiting howto, but maybe you should check it out, and then post your problems and questions here. I'm not sure that your solution can be written down in just five or six lines of a forum post. I'm not saying this to be dismissive; I'm saying this because people will be more likely to help if you post with a specific problem rather then asking them to write down a whole lot of stuff that's already been written down.

If you want help configuring squid, I may be able to help you with that, (I don't know it inside-out - just enough to achieve what I wanted to - so I can't guarantee help); I'd certainly be willing to share my working config file.

Good luck,

reetep.
 
  


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
Linux Gateway with 3 NICs pin_bk Linux - Networking 16 03-27-2005 09:57 AM
Using Linux as an internet router / gateway bashworth Linux - Networking 2 09-10-2004 06:00 PM
gateway for a linux router?? jmono Linux - Networking 12 11-17-2003 09:33 PM
linux router 3 nics amd dmz sheryco Linux - Networking 2 02-11-2003 06:26 PM
Linux as a gateway/router Why is it so difficult? quincy56 Linux - Networking 14 01-29-2002 06:30 PM

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

All times are GMT -5. The time now is 04:02 AM.

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